Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions maintainers/scripts/haskell/update-stackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ sed -r \
-e '/ jailbreak-cabal /d' \
-e '/ language-nix /d' \
-e '/ cabal-install /d' \
-e '/ lsp /d' \
-e '/ lsp-types /d' \
-e '/ lsp-test /d' \
-e '/ hie-bios /d' \
< "${tmpfile_new}" >> $stackage_config
# Explanations:
# cabal2nix, distribution-nixpkgs, jailbreak-cabal, language-nix: These are our packages and we know what we are doing.
# lsp, lsp-types, lsp-test, hie-bios: These are tightly coupled to hls which is not in stackage. They have no rdeps in stackage.

if [[ "${1:-}" == "--do-commit" ]]; then
git add $stackage_config
Expand Down
68 changes: 28 additions & 40 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1286,13 +1286,17 @@ self: super: {
# upstream: https://github.com/obsidiansystems/which/pull/6
which = doJailbreak super.which;

# the test suite attempts to run the binaries built in this package
# through $PATH but they aren't in $PATH
dhall-lsp-server = dontCheck super.dhall-lsp-server;

# https://github.com/ocharles/weeder/issues/15
weeder = doJailbreak super.weeder;

# 2022-09-20: We have overridden lsp to not be the stackage version.
# dhall-lsp-server needs the older 1.4.0.0 lsp
dhall-lsp-server = super.dhall-lsp-server.override {
lsp = dontCheck (super.lsp_1_4_0_0.override {
lsp-types = super.lsp-types_1_4_0_1;
});
};

# Requested version bump on upstream https://github.com/obsidiansystems/constraints-extras/issues/32
constraints-extras = doJailbreak super.constraints-extras;

Expand Down Expand Up @@ -1518,20 +1522,22 @@ self: super: {
})
] super.binary-strict;

# 2020-11-19: Checks nearly fixed, but still disabled because of flaky tests:
# https://github.com/haskell/haskell-language-server/issues/610
# https://github.com/haskell/haskell-language-server/issues/611
haskell-language-server = lib.pipe super.haskell-language-server [
haskell-language-server = (lib.pipe super.haskell-language-server [
dontCheck
(appendConfigureFlags ["-ftactics"])
(overrideCabal (old: {
libraryHaskellDepends = old.libraryHaskellDepends ++ [
super.hls-tactics-plugin
];
}))
];
(disableCabalFlag "stan") # Sorry stan is totally unmaintained and terrible to get to run. It only works on ghc 8.8 or 8.10 anyways …
]).overrideScope (lself: lsuper: {
# For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515
hlint = enableCabalFlag "ghc-lib" lself.hlint_3_4_1;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_4;
ormolu = doJailbreak lself.ormolu_0_5_0_1;
fourmolu = doJailbreak lself.fourmolu_0_8_2_0;
ghc-lib-parser = lself.ghc-lib-parser_9_2_4_20220729;
});

lsp = assert super.lsp.version == "1.4.0.0"; dontCheck super.lsp;
# For -f-auto see cabal.project in haskell-language-server.
ghc-lib-parser-ex_9_2_0_4 = disableCabalFlag "auto" (super.ghc-lib-parser-ex_9_2_0_4.override {
ghc-lib-parser = self.ghc-lib-parser_9_2_4_20220729;
});

# 2021-05-08: Tests fail: https://github.com/haskell/haskell-language-server/issues/1809
hls-eval-plugin = dontCheck super.hls-eval-plugin;
Expand All @@ -1552,6 +1558,9 @@ self: super: {
# https://github.com/haskell/haskell-language-server/issues/2375
hls-pragmas-plugin = dontCheck super.hls-pragmas-plugin;

# 2022-09-19: https://github.com/haskell/haskell-language-server/issues/3200
hls-refactor-plugin = dontCheck super.hls-refactor-plugin;

# 2021-03-21: Test hangs
# https://github.com/haskell/haskell-language-server/issues/1562
# 2021-11-13: Too strict upper bound on implicit-hie-cradle
Expand Down Expand Up @@ -2098,19 +2107,7 @@ self: super: {

# 2022-03-21: Newest stylish-haskell needs ghc-lib-parser-9_2
stylish-haskell = (super.stylish-haskell.override {
ghc-lib-parser = super.ghc-lib-parser_9_2_4_20220729;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_1_1;
});

ghc-lib-parser-ex_9_2_1_1 = super.ghc-lib-parser-ex_9_2_1_1.override {
ghc-lib-parser = super.ghc-lib-parser_9_2_4_20220729;
};

ghc-lib-parser-ex_9_2_0_4 = super.ghc-lib-parser-ex_9_2_0_4.override {
ghc-lib-parser = super.ghc-lib-parser_9_2_4_20220729;
};

hlint_3_4_1 = doDistribute (super.hlint_3_4_1.override {
ghc-lib-parser = self.ghc-lib-parser_9_2_4_20220729;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_4;
});

Expand Down Expand Up @@ -2141,10 +2138,6 @@ self: super: {
# 2021-08-18: streamly-posix was released with hspec 2.8.2, but it works with older versions too.
streamly-posix = doJailbreak super.streamly-posix;

# Not running the "example" test because it requires a binary from lsps test
# suite which is not part of the output of lsp.
lsp-test = overrideCabal (old: { testTarget = "tests func-test"; }) super.lsp-test;

# 2021-09-14: Tests are flaky.
hls-splice-plugin = dontCheck super.hls-splice-plugin;

Expand Down Expand Up @@ -2492,13 +2485,8 @@ self: super: {
# has been resolved.
lucid-htmx = doJailbreak super.lucid-htmx;

lsp_1_5_0_0 = doDistribute (super.lsp_1_5_0_0.override {
lsp-types = self.lsp-types_1_5_0_0;
});

futhark = super.futhark.override {
lsp = self.lsp_1_5_0_0;
};
# 2022-09-20: Restrictive upper bound on lsp
futhark = doJailbreak super.futhark;

# Too strict bounds on hspec
# https://github.com/klapaucius/vector-hashtables/issues/11
Expand Down
35 changes: 12 additions & 23 deletions pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,19 @@ self: super: {
executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ];
}) super.hnix);

mime-string = disableOptimization super.mime-string;
haskell-language-server = addBuildDepend self.hls-brittany-plugin (super.haskell-language-server.overrideScope (lself: lsuper: {
Cabal = lself.Cabal_3_6_3_0;
aeson = lself.aeson_1_5_6_0;
lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0
}));

hls-brittany-plugin = super.hls-brittany-plugin.overrideScope (lself: lsuper: {
brittany = doJailbreak lself.brittany_0_13_1_2;
aeson = lself.aeson_1_5_6_0;
lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0
});

# Older compilers need the latest ghc-lib to build this package.
# Fix build with ghc-lib >= 9.0 and ghc <= 8.10.7
# https://github.com/haskell/haskell-language-server/issues/2728
hls-hlint-plugin = addBuildDepend self.ghc-lib (appendPatch (pkgs.fetchpatch {
name = "hls-hlint-plugin-workaround.patch";
url = "https://github.com/haskell/haskell-language-server/pull/2854.patch";
hash = "sha256-bLGu0OQtXsmMF3rZM+R6k7bsZm4Vgf2r0ert5Wunong=";
stripLen = 2;
includes = ["src/Ide/Plugin/Hlint.hs"];
}) super.hls-hlint-plugin);

haskell-language-server = appendConfigureFlags [
"-f-stylishhaskell"
"-f-brittany"
]
super.haskell-language-server;

# has a restrictive lower bound on Cabal
fourmolu = doJailbreak super.fourmolu;

# ormolu 0.3 requires Cabal == 3.4
ormolu = super.ormolu_0_2_0_0;
mime-string = disableOptimization super.mime-string;

# weeder 2.3.0 no longer supports GHC 8.10
weeder = doDistribute (doJailbreak self.weeder_2_2_0);
Expand Down
31 changes: 17 additions & 14 deletions pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,23 @@ self: super: {

mime-string = disableOptimization super.mime-string;

# Older compilers need the latest ghc-lib to build this package.
hls-hlint-plugin = addBuildDepend self.ghc-lib (overrideCabal (drv: {
# Workaround for https://github.com/haskell/haskell-language-server/issues/2728
postPatch = ''
sed -i 's/(GHC.RealSrcSpan x,/(GHC.RealSrcSpan x Nothing,/' src/Ide/Plugin/Hlint.hs
'';
})
super.hls-hlint-plugin);

haskell-language-server = appendConfigureFlags [
"-f-stylishhaskell"
"-f-brittany"
]
super.haskell-language-server;
haskell-language-server = addBuildDepend self.hls-brittany-plugin (super.haskell-language-server.overrideScope (lself: lsuper: {
ghc-lib-parser = lself.ghc-lib-parser_8_10_7_20220219;
ghc-lib-parser-ex = addBuildDepend lself.ghc-lib-parser lself.ghc-lib-parser-ex_8_10_0_24;
# Pick old ormolu and fourmolu because ghc-lib-parser is not compatible
ormolu = doJailbreak lself.ormolu_0_1_4_1;
fourmolu = doJailbreak lself.fourmolu_0_3_0_0;
hlint = lself.hlint_3_2_8;
aeson = lself.aeson_1_5_6_0;
stylish-haskell = lself.stylish-haskell_0_13_0_0;
lsp-types = doJailbreak lsuper.lsp-types;
}));

hls-brittany-plugin = super.hls-brittany-plugin.overrideScope (lself: lsuper: {
brittany = doJailbreak lself.brittany_0_13_1_2;
aeson = lself.aeson_1_5_6_0;
lsp-types = doJailbreak lsuper.lsp-types;
});

# has a restrictive lower bound on Cabal
fourmolu = doJailbreak super.fourmolu;
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ self: super: {
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
}) (doJailbreak super.language-haskell-extract);

haskell-language-server = super.haskell-language-server.overrideScope (lself: lsuper: {
# Needed for modern ormolu and fourmolu.
# Apply this here and not in common, because other ghc versions offer different Cabal versions.
Cabal = lself.Cabal_3_6_3_0;
});

# The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x.
unordered-containers = dontCheck super.unordered-containers;

Expand Down
31 changes: 13 additions & 18 deletions pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,13 @@ self: super: {
revision = null;
} super.memory);

# Use hlint from git for GHC 9.2.1 support
hlint = self.hlint_3_4_1;
# For -fghc-lib see cabal.project in haskell-language-server.
stylish-haskell = enableCabalFlag "ghc-lib" super.stylish-haskell;

# For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515
hlint = enableCabalFlag "ghc-lib" (super.hlint_3_4_1.override {
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_4;
});

# https://github.com/sjakobi/bsb-http-chunked/issues/38
bsb-http-chunked = dontCheck super.bsb-http-chunked;
Expand All @@ -201,34 +206,24 @@ self: super: {
jacinda = doDistribute super.jacinda;
some = doJailbreak super.some;

# 2022-06-05: this is not the latest version of fourmolu because
# hls-fourmolu-plugin 1.0.3.0 doesn‘t support a newer one.
fourmolu = super.fourmolu_0_6_0_0;
# hls-fourmolu-plugin in this version has a to strict upper bound of fourmolu <= 0.5.0.0
hls-fourmolu-plugin = assert super.hls-fourmolu-plugin.version == "1.0.3.0"; doJailbreak super.hls-fourmolu-plugin;
fourmolu = super.fourmolu_0_8_2_0;

hls-ormolu-plugin = assert super.hls-ormolu-plugin.version == "1.0.2.1"; doJailbreak super.hls-ormolu-plugin;
implicit-hie-cradle = doJailbreak super.implicit-hie-cradle;
# 1.3 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
hashtables = assert super.hashtables.version == "1.2.4.2"; doJailbreak super.hashtables;

# 2022-08-01: Tests are broken on ghc 9.2.4: https://github.com/wz1000/HieDb/issues/46
hiedb = doJailbreak (dontCheck super.hiedb);

apply-refact = doDistribute super.apply-refact_0_10_0_0;

# 2022-02-05: The following plugins don‘t work yet on ghc9.2.
# Compare: https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html
haskell-language-server = overrideCabal (old: {libraryHaskellDepends = builtins.filter (x: x != super.hls-tactics-plugin) old.libraryHaskellDepends;})
(appendConfigureFlags [
"-f-haddockComments"
"-f-retrie"
"-f-splice"
"-f-tactics"
] (super.haskell-language-server.override {
haskell-language-server = super.haskell-language-server.override {
hls-haddock-comments-plugin = null;
hls-hlint-plugin = null;
hls-retrie-plugin = null;
hls-splice-plugin = null;
}));
hls-tactics-plugin = null;
};

# https://github.com/fpco/inline-c/pull/131
inline-c-cpp =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ extra-packages:
- dhall == 1.29.0 # required for ats-pkg
- dhall == 1.38.1 # required for spago
- doctest == 0.18.* # 2021-11-19: closest to stackage version for GHC 9.*
- fourmolu == 0.6.0.0 # 2022-06-05: Last fourmolu version compatible with hls 1.7/ hls-fourmolu-plugin 1.0.3.0
- ghc-api-compat == 8.10.7 # 2022-02-17: preserve for GHC 8.10.7
- ghc-api-compat == 8.6 # 2021-09-07: preserve for GHC 8.8.4
- ghc-lib == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 9.2
- ghc-lib-parser == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 9.2
- ghc-lib-parser-ex == 8.10.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 9.2
- ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 9.2
- ghc-lib-parser-ex >= 9.2.0.3 && < 9.2.1 # 2022-07-13: needed by hlint 3.4.1
- haddock == 2.23.* # required on GHC < 8.10.x
- haddock-api == 2.23.* # required on GHC < 8.10.x
Expand Down Expand Up @@ -153,6 +152,13 @@ extra-packages:
- basement < 0.0.15 # 2022-08-30: last version to support GHC < 8.10
- foundation < 0.0.29 # 2022-08-30: last version to support GHC < 8.10
- cabal-install-parsers < 0.5 # 2022-08-31: required by haskell-ci 0.14.3
- lsp == 1.4.0.0 # 2022-09-18: need for dhall-lsp-server 1.1.2
- lsp-types == 1.4.0.1 # 2022-09-18: need for dhall-lsp-server 1.1.2
- stylish-haskell == 0.13.0.0 # 2022-09-19: needed for hls on ghc 8.8
- brittany == 0.13.1.2 # 2022-09-20: needed for hls on ghc 8.8
- fourmolu == 0.3.0.0 # 2022-09-21: needed for hls on ghc 8.8
- ormolu == 0.1.4.1 # 2022-09-21: needed for hls on ghc 8.8
- hlint == 3.2.8 # 2022-09-21: needed for hls on ghc 8.8

package-maintainers:
abbradar:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,6 @@ default-package-overrides:
- hgeometry-combinatorial ==0.14
- hid ==0.2.2
- hidapi ==0.1.8
- hie-bios ==0.9.1
- hi-file-parser ==0.1.3.0
- higher-leveldb ==0.6.0.0
- highlighting-kate ==0.6.4
Expand Down Expand Up @@ -1455,9 +1454,6 @@ default-package-overrides:
- lpeg ==1.0.3
- lrucache ==1.2.0.1
- lrucaching ==0.3.3
- lsp ==1.4.0.0
- lsp-test ==0.14.0.2
- lsp-types ==1.4.0.1
- lua ==2.1.0
- lua-arbitrary ==1.0.1
- lucid ==2.11.1
Expand Down
18 changes: 15 additions & 3 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ self: super: builtins.intersectAttrs super {
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
}) super.LDAP);

# Not running the "example" test because it requires a binary from lsps test
# suite which is not part of the output of lsp.
lsp-test = overrideCabal (old: { testTarget = "tests func-test"; }) super.lsp-test;

# the test suite attempts to run the binaries built in this package
# through $PATH but they aren't in $PATH
dhall-lsp-server = dontCheck super.dhall-lsp-server;

# Expects z3 to be on path so we replace it with a hard
#
# The tests expect additional solvers on the path, replace the
Expand Down Expand Up @@ -935,11 +943,11 @@ self: super: builtins.intersectAttrs super {
}) super.procex;

# Test suite wants to run main executable
fourmolu_0_7_0_1 = overrideCabal (drv: {
fourmolu_0_8_2_0 = overrideCabal (drv: {
preCheck = drv.preCheck or "" + ''
export PATH="$PWD/dist/build/fourmolu:$PATH"
'';
}) super.fourmolu_0_7_0_1;
}) super.fourmolu_0_8_2_0;

# Apply a patch which hardcodes the store path of graphviz instead of using
# whatever graphviz is in PATH.
Expand Down Expand Up @@ -1053,9 +1061,13 @@ self: super: builtins.intersectAttrs super {
hls-fourmolu-plugin
hls-module-name-plugin
hls-pragmas-plugin
hls-splice-plugin;
hls-splice-plugin
hls-refactor-plugin
hls-code-range-plugin
hls-explicit-fixity-plugin;
# Tests have file permissions expections that don‘t work with the nix store.
hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin;
hls-gadt-plugin = dontCheck super.hls-gadt-plugin;

# Flaky tests
hls-hlint-plugin = dontCheck super.hls-hlint-plugin;
Expand Down
Loading