summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2021-07-12 05:02:58 +0200
committerGitHub <noreply@github.com>2021-07-12 05:02:58 +0200
commitc114cd459e1bac0d05e4e27c9ea43c99799cbbd1 (patch)
tree3b92f7abe97e54a96e899f8bd1c8c764c35df79a /pkgs/top-level
parenta3314ac77e1896ad2083c5b2099b26a9b5e9439b (diff)
parent63b1e6e48990c01ce0dcfbceb850047a2c24cbda (diff)
downloadnixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar.gz
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar.bz2
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar.lz
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar.xz
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.tar.zst
nixpkgs-c114cd459e1bac0d05e4e27c9ea43c99799cbbd1.zip
Merge pull request #129289 from nh2/issue-129247-ghc-musl-fixes
Fix GHC not building with musl
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/haskell-packages.nix6
-rw-r--r--pkgs/top-level/release-haskell.nix17
2 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 8bea40efe64..b872f3286e1 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -57,7 +57,8 @@ in {
 
     ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix {
       # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
-      bootPkgs = if stdenv.isAarch64 then
+      # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
+      bootPkgs = if stdenv.isAarch64 || stdenv.targetPlatform.isMusl then
           packages.ghc8102BinaryMinimal
         else
           packages.ghc865Binary;
@@ -67,7 +68,8 @@ in {
     };
     ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix {
       # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
-      bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 then
+      # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
+      bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 || stdenv.targetPlatform.isMusl then
           packages.ghc8102BinaryMinimal
         else
           packages.ghc865Binary;
diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix
index c4db73d416c..27449ac9726 100644
--- a/pkgs/top-level/release-haskell.nix
+++ b/pkgs/top-level/release-haskell.nix
@@ -96,6 +96,8 @@ let
         writers = testPlatforms.writers;
       };
 
+      pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler;
+
       # test some statically linked packages to catch regressions
       # and get some cache going for static compilation with GHC
       # Use integer-simple to avoid GMP linking problems (LGPL)
@@ -309,6 +311,21 @@ let
           jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.aarch64-linux
         ];
       };
+      muslGHCs = pkgs.releaseTools.aggregate {
+        name = "haskell-pkgsMusl-ghcs";
+        meta = {
+          description = "GHCs built with musl";
+          maintainers = with lib.maintainers; [
+            nh2
+          ];
+        };
+        constituents = accumulateDerivations [
+          jobs.pkgsMusl.haskell.compiler.ghc8102Binary
+          jobs.pkgsMusl.haskell.compiler.ghc884
+          jobs.pkgsMusl.haskell.compiler.ghc8104
+          jobs.pkgsMusl.haskell.compiler.ghc901
+        ];
+      };
     }
   ];