Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haskellPackages: fixes #202050

Merged
merged 2 commits into from
Nov 21, 2022
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
53 changes: 7 additions & 46 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1031,15 +1031,6 @@ self: super: {
(super.stack.overrideScope (self: super: {
# Needs Cabal-3.6
Cabal = self.Cabal_3_6_3_0;
# Official stack ships with hpack-0.35.0. Nixpkgs uses the same
# version of hpack so that users who get stack from Nixpkgs
# generate the same .cabal files as users who download official binaries
# of stack.
#
# dontCheck is used because one of the hpack tests appears to be
# incorrectly(?) failing:
# https://github.com/sol/hpack/issues/528
hpack = dontCheck self.hpack_0_35_0;
})));

# Too strict version bound on hashable-time.
Expand Down Expand Up @@ -1435,12 +1426,6 @@ self: super: {
# https://github.com/nikita-volkov/stm-containers/issues/29
stm-containers = doJailbreak super.stm-containers;

# https://github.com/agrafix/Spock/issues/180
# Ignore Stackage LTS bound so we can compile Spock-core again. All other
# reverse dependencies of reroute are marked as broken in nixpkgs, so
# upgrading reroute is probably unproblematic.
reroute = doDistribute self.reroute_0_7_0_0;

# Test suite fails to compile https://github.com/agrafix/Spock/issues/177
Spock = dontCheck super.Spock;

Expand Down Expand Up @@ -1572,11 +1557,7 @@ self: super: {
dontCheck
(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: {
ormolu = doJailbreak lself.ormolu_0_5_0_1;
fourmolu = doJailbreak lself.fourmolu_0_9_0_0;
hlint = enableCabalFlag "ghc-lib" lself.hlint_3_4_1;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_4;
ghc-lib-parser = lself.ghc-lib-parser_9_2_5_20221107;
hlint = enableCabalFlag "ghc-lib" lsuper.hlint;
# For most ghc versions, we overrideScope Cabal in the configuration-ghc-???.nix,
# because some packages, like ormolu, need a newer Cabal version.
# ghc-paths is special because it depends on Cabal for building
Expand All @@ -1589,21 +1570,13 @@ self: super: {
ghc-paths = lsuper.ghc-paths.override { Cabal = null; };
});

hledger_1_27_1 = doDistribute (super.hledger_1_27_1.override {
hledger-lib = self.hledger-lib_1_27_1;
});

hls-hlint-plugin = super.hls-hlint-plugin.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;
ghc-lib-parser = lself.ghc-lib-parser_9_2_5_20221107;
hlint = enableCabalFlag "ghc-lib" lsuper.hlint;
});

# 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_5_20221107;
});
ghc-lib-parser-ex = disableCabalFlag "auto" super.ghc-lib-parser-ex;

# 2021-05-08: Tests fail: https://github.com/haskell/haskell-language-server/issues/1809
hls-eval-plugin = dontCheck super.hls-eval-plugin;
Expand Down Expand Up @@ -1840,9 +1813,9 @@ self: super: {
# https://github.com/jaspervdj/profiteur/issues/33
profiteur = doJailbreak super.profiteur;

# Test suite has overly strict bounds on tasty.
# Test suite has overly strict bounds on tasty, jailbreaking fails.
# https://github.com/input-output-hk/nothunks/issues/9
nothunks = doJailbreak super.nothunks;
nothunks = dontCheck super.nothunks;
Comment on lines -1843 to +1818
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how we even deal with this in principle

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, how jailbreaking fails, but if it is because of cabal flags then we patch (or regex).
Disabling checks is also okay, I guess.

Copy link
Member Author

@ncfavier ncfavier Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think nothunks really does depend on an older version of tasty-hedgehog (or hedgehog) than we have in nixpkgs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothunks> test/Test/NoThunks/Class.hs:652:17: error:
nothunks>     • Couldn't match expected type: IO
nothunks>                                       (Hedgehog.Internal.Report.Report Result)
nothunks>                   with actual type: Property
nothunks>                                     -> m0 (Hedgehog.Internal.Report.Report Result)
nothunks>     • Probable cause: ‘checkNamed’ is applied to too few arguments
nothunks>       In the expression:
nothunks>         checkNamed r EnableColor (Just "EXPECTED FAILURE") p
nothunks>       In the second argument of ‘($)’, namely
nothunks>         ‘\ r -> checkNamed r EnableColor (Just "EXPECTED FAILURE") p’
nothunks>       In the second argument of ‘($)’, namely
nothunks>         ‘displayRegion
nothunks>            $ \ r -> checkNamed r EnableColor (Just "EXPECTED FAILURE") p’
nothunks>     |
nothunks> 652 |                 checkNamed r EnableColor (Just "EXPECTED FAILURE") p
nothunks>     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


# Allow building with recent versions of tasty.
lukko = doJailbreak super.lukko;
Expand Down Expand Up @@ -2178,12 +2151,6 @@ self: super: {
# https://github.com/plow-technologies/hspec-golden-aeson/issues/17
hspec-golden-aeson = dontCheck super.hspec-golden-aeson;

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

# To strict bound on hspec
# https://github.com/dagit/zenc/issues/5
zenc = doJailbreak super.zenc;
Expand All @@ -2195,7 +2162,7 @@ self: super: {
assert super.graphql.version == "1.0.3.0";
appendConfigureFlags [
"-f-json"
] (lib.warnIf (lib.versionAtLeast self.hspec.version "2.9.0") "@NixOS/haskell: Remove jailbreak for graphql" doJailbreak super.graphql);
] super.graphql;

# https://github.com/ajscholl/basic-cpuid/pull/1
basic-cpuid = appendPatch (fetchpatch {
Expand Down Expand Up @@ -2633,9 +2600,6 @@ in {
sha256 = "QzpZ7lDedsz1mZcq6DL4x7LBnn58rx70+ZVvPh9shRo=";
}) super.text-format;

# 2022-10-04: Needs newer tasty-dejafu than (currently) in stackage
rec-def = super.rec-def.override { tasty-dejafu = self.tasty-dejafu_2_1_0_0; };

# 2022-11-05: https://github.com/ysangkok/haskell-tzdata/issues/3
tzdata = dontCheck super.tzdata;

Expand All @@ -2647,9 +2611,6 @@ in {
# 2022-11-15: Needs newer witch package and brick 1.3 which in turn works with text-zipper 0.12
# Other dependencies are resolved with doJailbreak for both swarm and brick_1_3
swarm = doJailbreak (super.swarm.override {
witch = super.witch_1_1_2_0;
brick = doJailbreak (dontCheck (super.brick_1_3.override {
text-zipper = super.text-zipper_0_12;
}));
brick = doJailbreak (dontCheck super.brick_1_3);
});
})
8 changes: 4 additions & 4 deletions pkgs/development/haskell-modules/configuration-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ self: super: ({

# Build segfaults unless `fixity-th` is disabled.
# https://github.com/tweag/ormolu/issues/927
ormolu_0_5_0_1 = overrideCabal (drv: {
ormolu = overrideCabal (drv: {
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ];
}) (disableCabalFlag "fixity-th" super.ormolu_0_5_0_1);
fourmolu_0_9_0_0 = overrideCabal (drv: {
}) (disableCabalFlag "fixity-th" super.ormolu);
fourmolu = overrideCabal (drv: {
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ];
}) (disableCabalFlag "fixity-th" super.fourmolu_0_9_0_0);
}) (disableCabalFlag "fixity-th" super.fourmolu);

} // lib.optionalAttrs pkgs.stdenv.isx86_64 { # x86_64-darwin

Expand Down
38 changes: 5 additions & 33 deletions pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ self: super: {
# Tests fail because of typechecking changes
conduit = dontCheck super.conduit;

# 0.30 introduced support for GHC 9.2.
cryptonite = doDistribute self.cryptonite_0_30;

# cabal-install needs most recent versions of Cabal and Cabal-syntax
cabal-install = super.cabal-install.overrideScope (self: super: {
Cabal = self.Cabal_3_8_1_0;
Expand All @@ -80,14 +77,11 @@ self: super: {
assoc = doJailbreak super.assoc;
async = doJailbreak super.async;
base64-bytestring = doJailbreak super.base64-bytestring;
base-compat = self.base-compat_0_12_2;
base-compat-batteries = self.base-compat-batteries_0_12_2;
binary-instances = doJailbreak super.binary-instances;
ChasingBottoms = doJailbreak super.ChasingBottoms;
constraints = doJailbreak super.constraints;
cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
data-fix = doJailbreak super.data-fix;
dbus = self.dbus_1_2_27;
dec = doJailbreak super.dec;
ed25519 = doJailbreak super.ed25519;
ghc-byteorder = doJailbreak super.ghc-byteorder;
Expand All @@ -97,37 +91,32 @@ self: super: {
# causing the build-depends to be skipped. Since the dependency
# list hasn't changed much since 0.6.4, we can just reuse the
# normal expression.
inherit (self.ghc-exactprint_1_5_0) src version;
inherit (super.ghc-exactprint) src version;
revision = null; editedCabalFile = null;
libraryHaskellDepends = [
self.fail
self.ordered-containers
self.data-default
] ++ drv.libraryHaskellDepends or [];
}) super.ghc-exactprint;
ghc-lib = doDistribute self.ghc-lib_9_2_5_20221107;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_2_5_20221107;
ghc-lib-parser = doDistribute super.ghc-lib-parser;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_2_1_1;
hackage-security = doJailbreak super.hackage-security;
hashable = super.hashable_1_4_1_0;
hashable-time = doJailbreak super.hashable-time;
# 1.1.1 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
hedgehog = assert super.hedgehog.version == "1.0.5"; doJailbreak super.hedgehog;
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
indexed-traversable = doJailbreak super.indexed-traversable;
indexed-traversable-instances = doJailbreak super.indexed-traversable-instances;
lifted-async = doJailbreak super.lifted-async;
lukko = doJailbreak super.lukko;
lzma-conduit = doJailbreak super.lzma-conduit;
ormolu = self.ormolu_0_5_0_1;
parallel = doJailbreak super.parallel;
path = doJailbreak super.path;
polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
primitive = doJailbreak super.primitive;
regex-posix = doJailbreak super.regex-posix;
resolv = doJailbreak super.resolv;
retrie = doDistribute (dontCheck self.retrie_1_2_0_1);
retrie = dontCheck super.retrie;
singleton-bool = doJailbreak super.singleton-bool;
servant = doJailbreak super.servant;
servant-swagger = doJailbreak super.servant-swagger;
Expand Down Expand Up @@ -183,22 +172,11 @@ self: super: {
# Tests depend on `parseTime` which is no longer available
hourglass = dontCheck super.hourglass;

# 0.17.0 introduced support for GHC 9.2.x, so when this assert fails, the whole block can be removed
memory = assert super.memory.version == "0.16.0"; appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/memory-0.16.0.patch";
sha256 = "1kjganx729a6xfgfnrb3z7q6mvnidl042zrsd9n5n5a3i76nl5nl";
}) (overrideCabal {
editedCabalFile = null;
revision = null;
} super.memory);

# 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 = doDistribute (enableCabalFlag "ghc-lib" (super.hlint_3_4_1.override {
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_4;
}));
hlint = doDistribute (enableCabalFlag "ghc-lib" super.hlint);

# https://github.com/sjakobi/bsb-http-chunked/issues/38
bsb-http-chunked = dontCheck super.bsb-http-chunked;
Expand All @@ -208,17 +186,11 @@ self: super: {
jacinda = doDistribute super.jacinda;
some = doJailbreak super.some;

fourmolu = super.fourmolu_0_9_0_0;

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 = super.haskell-language-server.override {
Expand All @@ -232,6 +204,6 @@ self: super: {
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;

relude = dontCheck self.relude_1_1_0_0;
relude = dontCheck super.relude;
hermes-json = doJailbreak super.hermes-json;
}
6 changes: 0 additions & 6 deletions pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ in {
# Tests fail because of typechecking changes
conduit = dontCheck super.conduit;

# 0.30 introduced support for GHC 9.2.
cryptonite = doDistribute self.cryptonite_0_30;

doctest = self.doctest_0_20_1;
# consequences of doctest breakage follow:

Expand All @@ -85,8 +82,6 @@ in {
assoc = doJailbreak super.assoc;
async = doJailbreak super.async;
base64-bytestring = doJailbreak super.base64-bytestring;
base-compat = self.base-compat_0_12_2;
base-compat-batteries = self.base-compat-batteries_0_12_2;
binary-instances = doJailbreak super.binary-instances;
ChasingBottoms = doJailbreak super.ChasingBottoms;
constraints = doJailbreak super.constraints;
Expand All @@ -99,7 +94,6 @@ in {
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_4_3_20221104;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_4_0_0;
hackage-security = doJailbreak super.hackage-security;
hashable = super.hashable_1_4_1_0;
hashable-time = doJailbreak super.hashable-time;
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4687,7 +4687,6 @@ broken-packages:
- skemmtun
- skulk
- skylighting-extensions
- skylighting-format-ansi
- skype4hs
- slack
- slack-api
Expand Down
Loading