From 8ce5cd43da0edeaeaf3b41f1936907cc49cc0ff5 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sat, 23 Dec 2023 18:36:20 +0800 Subject: [PATCH] haskellPackages.repa: apply build fixes for ghc >= 9.4 Co-authored-by: sternenseemann --- .../haskell-modules/configuration-common.nix | 30 +++++++++++++++++++ .../configuration-hackage2nix/broken.yaml | 1 - .../transitive-broken.yaml | 3 -- .../haskell-modules/hackage-packages.nix | 5 ---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 93cbdf7b71f1..49ca0c9a1c4c 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index db8a77ae51c3..1e5bd3eeefc9 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -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 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 20b5a257892f..fb116e35e1cb 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -3345,15 +3345,12 @@ dont-distribute-packages: - remote-json-client - remote-json-server - remotion - - repa-algorithms - repa-array - repa-bytestring - repa-convert - repa-devil - - repa-examples - repa-fftw - repa-flow - - repa-io - repa-linear-algebra - repa-plugin - repa-sndfile diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 6293f9239ecf..a5bd34592195 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -253259,8 +253259,6 @@ self: { ]; description = "High performance, regular, shape polymorphic parallel arrays"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "repa-algorithms" = callPackage @@ -253272,7 +253270,6 @@ self: { libraryHaskellDepends = [ base repa vector ]; description = "Algorithms using the Repa array library"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "repa-array" = callPackage @@ -253366,7 +253363,6 @@ self: { ]; description = "Examples using the Repa array library"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "repa-fftw" = callPackage @@ -253422,7 +253418,6 @@ self: { ]; description = "Read and write Repa arrays in various formats"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "repa-linear-algebra" = callPackage