From 8b15fccf8ae1dfb0c9404e46b9b008d15f6a372d Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Sun, 4 Jul 2021 21:48:18 +0000 Subject: pkgsMuslhaskell.compiler.{ghc884,ghc8104}: Use GHC 8.10 as bootstrap compiler. This addresses the fact that `ghc865Binary` segfaults on musl (see #118731) because of the glibc+musl mix used in there. With the previous commits, `ghc8102Binary` was changed to use the musl-based bindist from GHC HQ instead, which works. With this change, all nix Haskell compilers builds on musl: NIX_PATH=nixpkgs=. nix-build --no-link --expr 'with import {}; { inherit (pkgsMusl.haskell.compiler) ghc884 ghc8104 ghc901 ghcHEAD; }' --- pkgs/top-level/haskell-packages.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkgs/top-level') 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; -- cgit 1.4.1 From 0044356dc7b53fbafb78ceb17cec05e293c70940 Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Mon, 5 Jul 2021 01:32:25 +0000 Subject: release-haskell.nix: Add pkgsMusl haskell compilers to Hydra jobs --- pkgs/top-level/release-haskell.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 87a08dddb60..bf26526872b 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 pkgsStatic.haskellPackages = { @@ -308,6 +310,21 @@ let jobs.pkgsStatic.haskellPackages.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 + ]; + }; } ]; -- cgit 1.4.1 From b7a0833e686e6d5dd9dca7e07ece90bf813ee3a9 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 13 Jul 2021 15:07:05 +0200 Subject: top-level/release-haskell.nix: don't test ghc865Binary on musl pkgsMusl.haskell.compiler.ghc865Binary is known and expected to not work, so we can remove it easily. Also gets rid of annoying evaluation errors. --- pkgs/top-level/release-haskell.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 27449ac9726..9cc5fb7e0a0 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -96,7 +96,12 @@ let writers = testPlatforms.writers; }; - pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler; + pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler // { + # remove musl ghc865Binary since it is known to be broken and + # causes an evaluation error on darwin. + # TODO: remove ghc865Binary altogether and use ghc8102Binary + ghc865Binary = {}; + }; # test some statically linked packages to catch regressions # and get some cache going for static compilation with GHC -- cgit 1.4.1 From 52acca72bff778d492aac4aceb144d12b2d7c771 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 13 Jul 2021 15:19:36 +0200 Subject: top-level/release-haskell.nix: test writers on all platforms Since the rust writer doesn't seem to get fixed on darwin, we'll just wrap the haskell writer test in our own derivation (which is possible since tests.writers exposes a bunch of internals via passthru) and expose it via tests.haskell which are already in mergeable. Finally a way to test the (hopefully) working haskell writer on darwin again! --- pkgs/test/haskell/default.nix | 1 + pkgs/test/haskell/writers/default.nix | 20 ++++++++++++++++++++ pkgs/top-level/release-haskell.nix | 11 +---------- 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 pkgs/test/haskell/writers/default.nix (limited to 'pkgs/top-level') diff --git a/pkgs/test/haskell/default.nix b/pkgs/test/haskell/default.nix index eb389f4051f..03e4f346155 100644 --- a/pkgs/test/haskell/default.nix +++ b/pkgs/test/haskell/default.nix @@ -4,4 +4,5 @@ lib.recurseIntoAttrs { shellFor = callPackage ./shellFor { }; documentationTarball = callPackage ./documentationTarball { }; setBuildTarget = callPackage ./setBuildTarget { }; + writers = callPackage ./writers { }; } diff --git a/pkgs/test/haskell/writers/default.nix b/pkgs/test/haskell/writers/default.nix new file mode 100644 index 00000000000..aa99e2c3c05 --- /dev/null +++ b/pkgs/test/haskell/writers/default.nix @@ -0,0 +1,20 @@ +# Wrap only the haskell-related tests from tests.writers +# in their own derivation for Hydra CI in the haskell-updates +# jobset. Can presumably removed as soon as tests.writers is +# always green on darwin as well: +# https://github.com/NixOS/nixpkgs/issues/126182 +{ runCommand, tests }: + +let + inherit (tests.writers) + writeTest + bin + simple + ; +in + +runCommand "test-haskell-writers" {} '' + ${writeTest "success" "test-haskell-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"} + ${writeTest "success" "test-haskell-simple-writer" simple.haskell} + touch $out +'' diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 9cc5fb7e0a0..5ca21134275 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -89,12 +89,7 @@ let haskellPackages = packagePlatforms pkgs.haskellPackages; haskell.compiler = packagePlatforms pkgs.haskell.compiler; - tests = let - testPlatforms = packagePlatforms pkgs.tests; - in { - haskell = testPlatforms.haskell; - writers = testPlatforms.writers; - }; + tests.haskell = packagePlatforms pkgs.tests.haskell; pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler // { # remove musl ghc865Binary since it is known to be broken and @@ -255,10 +250,6 @@ let constituents = accumulateDerivations [ # haskell specific tests jobs.tests.haskell - # writeHaskell and writeHaskellBin - # TODO: writeHaskell currently fails on darwin - jobs.tests.writers.x86_64-linux - jobs.tests.writers.aarch64-linux # important top-level packages jobs.cabal-install jobs.cabal2nix -- cgit 1.4.1 From 9fdec6876ebf668d62559cc35b5d7b2a9b208e3f Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sat, 17 Jul 2021 13:30:51 +0900 Subject: release-haskell: disable the x86_64-darwin writers test --- pkgs/top-level/release-haskell.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 5ca21134275..fe5241e3634 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -249,7 +249,10 @@ let }; constituents = accumulateDerivations [ # haskell specific tests - jobs.tests.haskell + # + # TODO: The writers test appears to be failing on darwin for unknown + # reasons. See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881307871. + (lib.recursiveUpdate jobs.tests.haskell { writers.x86_64-darwin = null; }) # important top-level packages jobs.cabal-install jobs.cabal2nix -- cgit 1.4.1