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.{repa,hip}: Apply build fixes #276275

Closed
wants to merge 9 commits into from
30 changes: 30 additions & 0 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2807,4 +2807,34 @@ self: super: {
ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_10_0;
});

inherit
(let
unbreakRepa = packageName: drv: lib.pipe drv [
# 2023-12-23: Apply build fixes for ghc >=9.4
(appendPatches (lib.optionals (lib.versionAtLeast self.ghc.version "9.4") (repaPatches.${packageName} or [])))
# 2023-12-23: jailbreak for base <4.17, vector <0.13
doJailbreak
];
# https://github.com/haskell-repa/repa/pull/27
repaPatches = lib.mapAttrs (relative: hash: lib.singleton (pkgs.fetchpatch {
name = "repa-pr-27.patch";
url = "https://github.com/haskell-repa/repa/pull/27/commits/40cb2866bb4da51a8cac5e3792984744a64b016e.patch";
inherit relative hash;
})) {
repa = "sha256-bcSnzvCJmmSBts9UQHA2dYL0Q+wXN9Fbz5LfkrmhCo8=";
repa-io = "sha256-KsIN7NPWCyTpVzhR+xaBKGl8vC6rYH94llvlTawSxFk=";
repa-examples = "sha256-//2JG1CW1h2sKS2BSJadVAujSE3v1TfS0F8zgcNkPI8=";
repa-algorithms = "sha256-z/a7DpT3xJrIsif4cbciYcTSjapAtCoNNVX7PrZtc4I=";
};
in
lib.mapAttrs unbreakRepa super)
repa
repa-io
repa-examples
repa-algorithms
# The following packages aren't fixed yet, sorry:
# repa-array, repa-convert, repa-eval, repa-flow,
# repa-query, repa-scalar, repa-store, repa-stream
;

} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super
13 changes: 9 additions & 4 deletions pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,13 @@ in {
stylish-haskell
;

# Needs compat library for GHC < 9.6
indexed-traversable = addBuildDepends [
self.foldable1-classes-compat
] super.indexed-traversable;
# Packages which need compat library for GHC < 9.6
inherit
(lib.mapAttrs
(_: addBuildDepends [ self.foldable1-classes-compat ])
super)
indexed-traversable
OneTuple
these
;
}
4 changes: 4 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,8 @@ self: super: {
# for these sorts of situations even on 9.2 and 9.4).
# https://gitlab.haskell.org/ghc/ghc/-/issues/23746#note_525318
tls = if pkgs.stdenv.hostPlatform.isAarch64 then self.forceLlvmCodegenBackend super.tls else super.tls;

# 2023-12-23: It needs this to build under ghc-9.6.3.
# A factor of 100 is insufficent, 200 seems seems to work.
hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip;
}
42 changes: 34 additions & 8 deletions pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ self: super: {
hls-stylish-haskell-plugin = null;
};

# Version upgrades
th-abstraction = doDistribute self.th-abstraction_0_6_0_0;
#
# Version deviations from Stackage LTS
#

th-abstraction = doDistribute self.th-abstraction_0_6_0_0; # allows template-haskell-2.21
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_8_1_20231121;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_8_0_0;
ghc-lib = doDistribute self.ghc-lib_9_8_1_20231121;
Expand All @@ -75,18 +78,34 @@ self: super: {
ormolu = doDistribute self.ormolu_0_7_3_0;
fourmolu = doDistribute (dontCheck self.fourmolu_0_14_1_0);


#
# Jailbreaks
commutative-semigroups = doJailbreak super.commutative-semigroups; # base < 4.19
ghc-trace-events = doJailbreak super.ghc-trace-events; # text < 2.1, bytestring < 0.12, base < 4.19
primitive-unlifted = doJailbreak super.primitive-unlifted; # bytestring < 0.12
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-fingertree = doJailbreak super.hw-fingertree; # deepseq <1.5, doctest < 0.22, hedgehog < 1.4
#

# Too strict bound on base, believe it or not.
# https://github.com/judah/terminfo/pull/55#issuecomment-1876894232
terminfo_0_4_1_6 = doJailbreak super.terminfo_0_4_1_6;

inherit (pkgs.lib.mapAttrs (_: doJailbreak ) super)
blaze-svg # base <4.19 https://github.com/diagrams/blaze-svg/pull/2
diagrams-lib # base <4.19, text <2.1 https://github.com/diagrams/diagrams-lib/pull/364
diagrams-postscript # base <4.19, bytestring <0.12
diagrams-svg # base <4.19, text <2.1
free # Because we bumped the version of th-abstraction above.^
ghc-trace-events # text < 2.1, bytestring < 0.12, base < 4.19
hw-fingertree # deepseq <1.5, doctest < 0.22, hedgehog < 1.4
hw-prim # doctest < 0.22, ghc-prim < 0.11, hedgehog < 1.4
newtype-generics # base < 4.19
primitive-unlifted # bytestring < 0.12
statestack # base <4.19 https://github.com/diagrams/statestack/pull/11
svg-builder # base <4.19, bytestring <0.12, text <2.1
;

#
# Test suite issues
#

unordered-containers = dontCheck super.unordered-containers; # ChasingBottoms doesn't support base 4.20
lifted-base = dontCheck super.lifted-base; # doesn't compile with transformers == 0.6.*
# https://github.com/wz1000/HieDb/issues/64
Expand All @@ -95,4 +114,11 @@ self: super: {
"--match" "!/hiedb/Command line/point-info/correctly prints type signatures/"
];
}) super.hiedb;

#
# Build fixes
#

# 2023-12-23: Avoid "Simplifier ticks exhausted" error under ghc-9.8.1.
hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4655,7 +4655,6 @@ broken-packages:
- reorderable # failure in job https://hydra.nixos.org/build/233256477 at 2023-09-02
- reorder-expression # failure in job https://hydra.nixos.org/build/233215573 at 2023-09-02
- repa-eval # failure in job https://hydra.nixos.org/build/233259486 at 2023-09-02
- repa # failure in job https://hydra.nixos.org/build/233219888 at 2023-09-02
- repa-scalar # failure in job https://hydra.nixos.org/build/233213694 at 2023-09-02
- repa-series # failure in job https://hydra.nixos.org/build/233200085 at 2023-09-02
- ReplaceUmlaut # failure in job https://hydra.nixos.org/build/233228662 at 2023-09-02
Expand Down
Loading