haskellPackages: remove jailbreak for many packages

This commit is contained in:
Alexandre Esteves 2025-02-23 04:02:13 +00:00
parent c1bfc3da0d
commit b5d11659b7
4 changed files with 13 additions and 48 deletions

View File

@ -115,18 +115,16 @@ self: super: {
ghc-paths = lsuper.ghc-paths.override { Cabal = null; }; ghc-paths = lsuper.ghc-paths.override { Cabal = null; };
})) }))
[ [
doJailbreak
dontCheck dontCheck
]; ];
hls-plugin-api = doJailbreak super.hls-plugin-api; ghcide = appendPatch (pkgs.fetchpatch {
ghcide = doJailbreak (appendPatch (pkgs.fetchpatch {
name = "ghcide-ghc-9.8.3.patch"; name = "ghcide-ghc-9.8.3.patch";
url = "https://github.com/haskell/haskell-language-server/commit/6d0a6f220226fe6c1cb5b6533177deb55e755b0b.patch"; url = "https://github.com/haskell/haskell-language-server/commit/6d0a6f220226fe6c1cb5b6533177deb55e755b0b.patch";
sha256 = "1jwxldar9qzkg2z6vsx8f2yih3vkf4yjk9p3mryv0azn929qn3h1"; sha256 = "1jwxldar9qzkg2z6vsx8f2yih3vkf4yjk9p3mryv0azn929qn3h1";
stripLen = 1; stripLen = 1;
excludes = [ "cabal.project" ]; excludes = [ "cabal.project" ];
}) super.ghcide); }) super.ghcide;
# For -f-auto see cabal.project in haskell-language-server. # For -f-auto see cabal.project in haskell-language-server.
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex); ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex);
@ -252,9 +250,6 @@ self: super: {
# There are numerical tests on random data, that may fail occasionally # There are numerical tests on random data, that may fail occasionally
lapack = dontCheck super.lapack; lapack = dontCheck super.lapack;
# currently, cabal-plan seems to get not much maintenance
cabal-plan = doJailbreak super.cabal-plan;
# support for transformers >= 0.6 # support for transformers >= 0.6
lifted-base = appendPatch (fetchpatch { lifted-base = appendPatch (fetchpatch {
url = "https://github.com/basvandijk/lifted-base/commit/6b61483ec7fd0d5d5d56ccb967860d42740781e8.patch"; url = "https://github.com/basvandijk/lifted-base/commit/6b61483ec7fd0d5d5d56ccb967860d42740781e8.patch";
@ -771,8 +766,7 @@ self: super: {
separated = dontCheck super.separated; separated = dontCheck super.separated;
shadowsocks = dontCheck super.shadowsocks; shadowsocks = dontCheck super.shadowsocks;
shake-language-c = dontCheck super.shake-language-c; shake-language-c = dontCheck super.shake-language-c;
snap-core = doJailbreak (dontCheck super.snap-core); # attoparsec bound is too strict. This has been fixed on master snap-core = dontCheck super.snap-core;
snap-server = doJailbreak super.snap-server; # attoparsec bound is too strict
sourcemap = dontCheck super.sourcemap; sourcemap = dontCheck super.sourcemap;
static-resources = dontCheck super.static-resources; static-resources = dontCheck super.static-resources;
strive = dontCheck super.strive; # fails its own hlint test with tons of warnings strive = dontCheck super.strive; # fails its own hlint test with tons of warnings
@ -896,9 +890,6 @@ self: super: {
# 2025-02-10: Too strict bounds on hedgehog < 1.5 # 2025-02-10: Too strict bounds on hedgehog < 1.5
tasty-sugar = doJailbreak super.tasty-sugar; tasty-sugar = doJailbreak super.tasty-sugar;
# Allow bytestring-0.12.1.0, https://github.com/lpeterse/haskell-socket/issues/71
socket = doJailbreak super.socket;
# Known issue with nondeterministic test suite failure # Known issue with nondeterministic test suite failure
# https://github.com/nomeata/tasty-expected-failure/issues/21 # https://github.com/nomeata/tasty-expected-failure/issues/21
tasty-expected-failure = dontCheck super.tasty-expected-failure; tasty-expected-failure = dontCheck super.tasty-expected-failure;
@ -938,9 +929,6 @@ self: super: {
# https://github.com/kazu-yamamoto/logger/issues/42 # https://github.com/kazu-yamamoto/logger/issues/42
logger = dontCheck super.logger; logger = dontCheck super.logger;
# https://github.com/Euterpea/Euterpea2/issues/40
Euterpea = doJailbreak super.Euterpea;
# Byte-compile elisp code for Emacs. # Byte-compile elisp code for Emacs.
ghc-mod = overrideCabal (drv: { ghc-mod = overrideCabal (drv: {
preCheck = "export HOME=$TMPDIR"; preCheck = "export HOME=$TMPDIR";
@ -1450,14 +1438,10 @@ self: super: {
# lsp-1.4.0.0 which is hard to build with this LTS. However, the latest # lsp-1.4.0.0 which is hard to build with this LTS. However, the latest
# git version of dhall-lsp-server works with lsp-2.1.0.0, and only # git version of dhall-lsp-server works with lsp-2.1.0.0, and only
# needs jailbreaking to build successfully. # needs jailbreaking to build successfully.
dhall-lsp-server = lib.pipe dhall-lsp-server = super.dhall-lsp-server.overrideScope (lself: lsuper: {
(super.dhall-lsp-server.overrideScope (lself: lsuper: { lsp = doJailbreak lself.lsp_2_1_0_0; # sorted-list <0.2.2
lsp = doJailbreak lself.lsp_2_1_0_0; # sorted-list <0.2.2 lsp-types = doJailbreak lself.lsp-types_2_1_1_0; # lens <5.3
lsp-types = doJailbreak lself.lsp-types_2_1_1_0; # lens <5.3 });
}))
[
doJailbreak
];
ghcjs-dom-hello = appendPatches [ ghcjs-dom-hello = appendPatches [
(fetchpatch { (fetchpatch {
@ -1862,7 +1846,6 @@ self: super: {
# 2021-04-16: too strict bounds on QuickCheck and tasty # 2021-04-16: too strict bounds on QuickCheck and tasty
# https://github.com/hasufell/lzma-static/issues/1 # https://github.com/hasufell/lzma-static/issues/1
lzma-static = doJailbreak super.lzma-static; lzma-static = doJailbreak super.lzma-static;
xz = doJailbreak super.xz;
# Too strict version bounds on base: # Too strict version bounds on base:
# https://github.com/obsidiansystems/database-id/issues/1 # https://github.com/obsidiansystems/database-id/issues/1
@ -2032,7 +2015,7 @@ self: super: {
"--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/unique: simple test/" "--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/unique: simple test/"
"--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/repeatedBy: simple test/" "--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/repeatedBy: simple test/"
] ++ drv.testFlags or []; ] ++ drv.testFlags or [];
}) (doJailbreak super.Unique); }) super.Unique;
# https://github.com/AndrewRademacher/aeson-casing/issues/8 # https://github.com/AndrewRademacher/aeson-casing/issues/8
aeson-casing = assert super.aeson-casing.version == "0.2.0.0"; overrideCabal (drv: { aeson-casing = assert super.aeson-casing.version == "0.2.0.0"; overrideCabal (drv: {
@ -2393,8 +2376,6 @@ self: super: {
# Overly strict bounds on tasty-quickcheck (test suite) (< 0.11) # Overly strict bounds on tasty-quickcheck (test suite) (< 0.11)
hashable = doJailbreak super.hashable; hashable = doJailbreak super.hashable;
# https://github.com/haskell/aeson/pull/1126
text-iso8601 = doJailbreak super.text-iso8601;
# https://github.com/well-typed/cborg/issues/340 # https://github.com/well-typed/cborg/issues/340
cborg = doJailbreak super.cborg; cborg = doJailbreak super.cborg;
# Doesn't compile with tasty-quickcheck == 0.11 (see issue above) # Doesn't compile with tasty-quickcheck == 0.11 (see issue above)
@ -2803,7 +2784,7 @@ let
setAmazonkaSourceRoot = dir: drv: (overrideSrc { version = "2.0"; src = amazonkaSrc + "/${dir}"; }) drv; setAmazonkaSourceRoot = dir: drv: (overrideSrc { version = "2.0"; src = amazonkaSrc + "/${dir}"; }) drv;
isAmazonkaService = name: lib.hasPrefix "amazonka-" name && name != "amazonka-test"; isAmazonkaService = name: lib.hasPrefix "amazonka-" name && name != "amazonka-test";
amazonkaServices = lib.filter isAmazonkaService (lib.attrNames super); amazonkaServices = lib.filter isAmazonkaService (lib.attrNames super);
amazonkaServiceOverrides = (lib.genAttrs amazonkaServices (name: lib.pipe super.${name} [(setAmazonkaSourceRoot "lib/services/${name}") doJailbreak])); amazonkaServiceOverrides = (lib.genAttrs amazonkaServices (name: lib.pipe super.${name} [(setAmazonkaSourceRoot "lib/services/${name}") (x: x)]));
in in
amazonkaServiceOverrides // { amazonkaServiceOverrides // {
amazonka-core = assert super.amazonka-core.version == "2.0"; lib.pipe amazonka-core = assert super.amazonka-core.version == "2.0"; lib.pipe

View File

@ -60,32 +60,17 @@ self: super: {
# #
# Jailbreaks # Jailbreaks
# #
blaze-svg = doJailbreak super.blaze-svg; # base <4.19
commutative-semigroups = doJailbreak super.commutative-semigroups; # base < 4.19
diagrams-lib = doJailbreak super.diagrams-lib; # base <4.19, text <2.1
diagrams-postscript = doJailbreak super.diagrams-postscript; # base <4.19, bytestring <0.12
diagrams-svg = doJailbreak super.diagrams-svg; # base <4.19, text <2.1
ghc-trace-events = doJailbreak super.ghc-trace-events; # text < 2.1, bytestring < 0.12, base < 4.19
hashing = doJailbreak super.hashing; # bytestring <0.12 hashing = doJailbreak super.hashing; # bytestring <0.12
hevm = appendPatch (pkgs.fetchpatch { hevm = appendPatch (pkgs.fetchpatch {
url = "https://github.com/hellwolf/hevm/commit/338674d1fe22d46ea1e8582b24c224d76d47d0f3.patch"; url = "https://github.com/hellwolf/hevm/commit/338674d1fe22d46ea1e8582b24c224d76d47d0f3.patch";
name = "release-0.54.2-ghc-9.8.4-patch"; name = "release-0.54.2-ghc-9.8.4-patch";
sha256 = "sha256-Mo65FfP1nh7QTY+oLia22hj4eV2v9hpXlYsrFKljA3E="; sha256 = "sha256-Mo65FfP1nh7QTY+oLia22hj4eV2v9hpXlYsrFKljA3E=";
}) super.hevm; }) super.hevm;
json-sop = doJailbreak super.json-sop; # aeson <2.2, base <4.19, text <2.1
primitive-unlifted = doJailbreak super.primitive-unlifted; # bytestring < 0.12 primitive-unlifted = doJailbreak super.primitive-unlifted; # bytestring < 0.12
statestack = doJailbreak super.statestack; # base < 4.19
newtype-generics = doJailbreak super.newtype-generics; # base < 4.19
hw-prim = doJailbreak super.hw-prim; # doctest < 0.22, ghc-prim < 0.11, hedgehog < 1.4 hw-prim = doJailbreak super.hw-prim; # doctest < 0.22, ghc-prim < 0.11, hedgehog < 1.4
svg-builder = doJailbreak super.svg-builder; # base <4.19, bytestring <0.12, text <2.1
HaskellNet-SSL = doJailbreak super.HaskellNet-SSL; # bytestring >=0.9 && <0.12 HaskellNet-SSL = doJailbreak super.HaskellNet-SSL; # bytestring >=0.9 && <0.12
raven-haskell = doJailbreak super.raven-haskell; # aeson <2.2
saltine = doJailbreak super.saltine; # bytestring && <0.12, deepseq <1.5, text > 1.2 && <1.3 || >=2.0 && <2.1 saltine = doJailbreak super.saltine; # bytestring && <0.12, deepseq <1.5, text > 1.2 && <1.3 || >=2.0 && <2.1
stripe-concepts = doJailbreak super.stripe-concepts; # text >=1.2.5 && <1.3 || >=2.0 && <2.1
stripe-signature = doJailbreak super.stripe-signature; # text >=1.2.5 && <1.3 || >=2.0 && <2.1
string-random = doJailbreak super.string-random; # text >=1.2.2.1 && <2.1
inflections = doJailbreak super.inflections; # text >=0.2 && <2.1 inflections = doJailbreak super.inflections; # text >=0.2 && <2.1
universe-some = doJailbreak super.universe-some; # th-abstraction < 0.7
broadcast-chan = doJailbreak super.broadcast-chan; # base <4.19 https://github.com/merijn/broadcast-chan/pull/19 broadcast-chan = doJailbreak super.broadcast-chan; # base <4.19 https://github.com/merijn/broadcast-chan/pull/19
# #

View File

@ -598,7 +598,7 @@ self: super: builtins.intersectAttrs super {
''; '';
}) super.GLUT; }) super.GLUT;
libsystemd-journal = doJailbreak (addExtraLibrary pkgs.systemd super.libsystemd-journal); libsystemd-journal = addExtraLibrary pkgs.systemd super.libsystemd-journal;
# does not specify tests in cabal file, instead has custom runTest cabal hook, # does not specify tests in cabal file, instead has custom runTest cabal hook,
# so cabal2nix will not detect test dependencies. # so cabal2nix will not detect test dependencies.
@ -952,8 +952,7 @@ self: super: builtins.intersectAttrs super {
}) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap); }) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap);
# Compiling the readme throws errors and has no purpose in nixpkgs # Compiling the readme throws errors and has no purpose in nixpkgs
aeson-gadt-th = aeson-gadt-th = disableCabalFlag "build-readme" super.aeson-gadt-th;
disableCabalFlag "build-readme" (doJailbreak super.aeson-gadt-th);
# Fix compilation of Setup.hs by removing the module declaration. # Fix compilation of Setup.hs by removing the module declaration.
# See: https://github.com/tippenein/guid/issues/1 # See: https://github.com/tippenein/guid/issues/1
@ -1065,7 +1064,7 @@ self: super: builtins.intersectAttrs super {
substituteInPlace src/Nix/Diff/Types.hs \ substituteInPlace src/Nix/Diff/Types.hs \
--replace "{-# OPTIONS_GHC -Wno-orphans #-}" "{-# OPTIONS_GHC -Wno-orphans -fconstraint-solver-iterations=0 #-}" --replace "{-# OPTIONS_GHC -Wno-orphans #-}" "{-# OPTIONS_GHC -Wno-orphans -fconstraint-solver-iterations=0 #-}"
''; '';
}) (doJailbreak (dontCheck super.nix-diff)); }) (dontCheck super.nix-diff);
# mockery's tests depend on hspec-discover which dependso on mockery for its tests # mockery's tests depend on hspec-discover which dependso on mockery for its tests
mockery = dontCheck super.mockery; mockery = dontCheck super.mockery;

View File

@ -23,7 +23,7 @@ let
}); });
in in
{ {
tensorflow-proto = doJailbreak (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto); tensorflow-proto = setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto;
tensorflow = overrideCabal (drv: { tensorflow = overrideCabal (drv: {
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.vector-split ]; libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.vector-split ];