From 7d20323b117efe1821baaa12c2e2bc641c580568 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Thu, 15 Jul 2021 12:35:15 +0200 Subject: top-level/release-haskell.nix: add agda packages and test to jobset Since the agda compiler is updated via haskellPackages.Agda, we are quite likely to cause regressions in agdaPackages when the language is changed via compiler updates. Thus we should build agdaPackages (which is very small) as part of the haskell-updates jobset and track if basic agda functionality (compiler and standard library) is working. --- pkgs/top-level/release-haskell.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 5ca21134275d..151a415f4768 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -91,6 +91,9 @@ let tests.haskell = packagePlatforms pkgs.tests.haskell; + nixosTests.agda = (packagePlatforms pkgs.nixosTests).agda; + agdaPackages = packagePlatforms pkgs.agdaPackages; + 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. -- cgit 1.4.1 From 264e63477da228071f03a0b4bfd17a9f612e7bc1 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Thu, 22 Jul 2021 13:51:57 +0200 Subject: pkgs.haskell.package-list: init This commit introduces a maintainer script to upload our current list of haskell-packages to hackage. --- .../haskell/upload-nixos-package-list-to-hackage.sh | 21 +++++++++++++++++++++ pkgs/development/haskell-modules/HACKING.md | 8 ++++++++ pkgs/development/haskell-modules/package-list.nix | 19 +++++++++++++++++++ pkgs/top-level/haskell-packages.nix | 2 ++ 4 files changed, 50 insertions(+) create mode 100755 maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh create mode 100644 pkgs/development/haskell-modules/package-list.nix (limited to 'pkgs/top-level') diff --git a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh new file mode 100755 index 000000000000..f887f0c42931 --- /dev/null +++ b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p nix curl gnused -I nixpkgs=. + +# On Hackage every package description shows a category "Distributions" which +# lists a "NixOS" version. +# This script uploads a csv to hackage which will update the displayed versions +# based on the current versions in nixpkgs. This happens with on simple http +# request. + +# For authorization you just need to have any valid hackage account. This +# script uses the `username` and `password-command` field from your +# ~/.cabal/config file. + +# e.g. username: maralorn +# password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression.) +# Those fields are specified under `upload` on the `cabal` man page. + +package_list="$(nix-build -A haskell.package-list)/nixos-hackage-packages.csv" +username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //") +password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //") +curl -u "$username:$($password_command)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv diff --git a/pkgs/development/haskell-modules/HACKING.md b/pkgs/development/haskell-modules/HACKING.md index 37bd5544fe1b..98ab03a0edd1 100644 --- a/pkgs/development/haskell-modules/HACKING.md +++ b/pkgs/development/haskell-modules/HACKING.md @@ -241,6 +241,14 @@ When you've double-checked these points, go ahead and merge the `haskell-updates After merging, **make sure not to delete the `haskell-updates` branch**, since it causes all currently open Haskell-related pull-requests to be automatically closed on GitHub. +## Update Hackage Version Information + +After merging into master you can update what hackage displays as the current +version in NixOS for every individual package. +To do this you run `maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh`. +See the script for how to provide credentials. Once you have configured that +running this takes only a few seconds. + ## Additional Info Here are some additional tips that didn't fit in above. diff --git a/pkgs/development/haskell-modules/package-list.nix b/pkgs/development/haskell-modules/package-list.nix new file mode 100644 index 000000000000..64f4be3a7722 --- /dev/null +++ b/pkgs/development/haskell-modules/package-list.nix @@ -0,0 +1,19 @@ +{ runCommand, haskellPackages, lib, all-cabal-hashes, writeShellScript }: +let + pkgLine = name: pkg: + let + version = pkg.version or ""; + in + if version != "" then + ''"${name}","${version}","http://hydra.nixos.org/job/nixpkgs/trunk/haskellPackages.${name}.x86_64-linux"'' + else ""; + all-haskellPackages = builtins.toFile "all-haskellPackages" (lib.concatStringsSep "\n" (lib.filter (x: x != "") (lib.mapAttrsToList pkgLine haskellPackages))); +in +runCommand "hackage-package-list" { } + # This command will make a join between all packages on hackage and haskellPackages.*. + # It creates a valid csv file which can be uploaded to hackage.haskell.org. + # The call is wrapped in echo $(...) to trim trailing newline, which hackage requires. + '' + mkdir -p $out/bin + echo -n "$(tar -t -f ${all-cabal-hashes} | sed 's![^/]*/\([^/]*\)/.*!"\1"!' | sort -u | join -t , - ${all-haskellPackages})" > $out/nixos-hackage-packages.csv + '' diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index b872f3286e16..86a09b4a1fad 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -42,6 +42,8 @@ let in { lib = haskellLib; + package-list = callPackage ../development/haskell-modules/package-list.nix {}; + compiler = { ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix { }; -- cgit 1.4.1 From f78a3ef8355de25c380d1ed3c073f178f3940d0d Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 15:00:58 +0900 Subject: release-haskell: move location of muslGHCs so that musl always comes before static This is just a small reorganization. --- pkgs/top-level/release-haskell.nix | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 1dc728b2da28..2c1d9ec37b56 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -294,6 +294,23 @@ let (name: jobs.haskellPackages."${name}") (maintainedPkgNames pkgs.haskellPackages)); }; + + 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 + ]; + }; + staticHaskellPackages = pkgs.releaseTools.aggregate { name = "static-haskell-packages"; meta = { @@ -313,21 +330,6 @@ 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 - ]; - }; } ]; -- cgit 1.4.1 From cae27cfeb470fa84b1ca90d92127b1ffaf60a47c Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 15:04:43 +0900 Subject: release-haskell: disable aarch64 builds from staticHaskellPackages These aarch64 builds appear to be timing out. --- pkgs/top-level/release-haskell.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 2c1d9ec37b56..4d048b315358 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -321,13 +321,24 @@ let ]; }; constituents = [ + # aarch64-linux + # + # TODO: Times out on Hydra + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.aarch64-linux + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.aarch64-linux + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.aarch64-linux + + # x86_64-darwin + # # TODO: reenable darwin builds if static libiconv works + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.x86_64-darwin + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.x86_64-darwin + # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.x86_64-darwin + + # x86_64-linux jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.aarch64-linux jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.aarch64-linux jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.aarch64-linux ]; }; } -- cgit 1.4.1 From e8bdec3e3234afe6b4e8dc73aa4ec7eccf6d70c0 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 15:14:30 +0900 Subject: release-haskell: stop building aarch64 and darwin static haskell packages The statically-linked Haskell packages on Darwin are not currently working because libiconv is not building statically on Darwin. The statically-linked Haskell packages on aarch64 are timing out on Hydra. --- pkgs/top-level/release-haskell.nix | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 4d048b315358..c2e81ddbb428 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -101,17 +101,6 @@ let ghc865Binary = {}; }; - # 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) - pkgsStatic.haskell.packages.integer-simple.ghc8104 = { - inherit (staticHaskellPackagesPlatforms) - hello - random - lens - ; - }; - # top-level packages that depend on haskellPackages inherit (pkgsPlatforms) agda @@ -218,6 +207,23 @@ let ; elmPackages.elm = pkgsPlatforms.elmPackages.elm; + + # 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) + pkgsStatic.haskell.packages.integer-simple.ghc8104 = + removePlatforms + [ + "aarch64-linux" # times out on Hydra + "x86_64-darwin" # TODO: reenable when static libiconv works on darwin + ] + { + inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.integer-simple.ghc8104) + hello + lens + random + ; + }; }) (versionedCompilerJobs { # Packages which should be checked on more than the -- cgit 1.4.1 From b0a42925f191a3900932e47565f960893b11012d Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 15:17:02 +0900 Subject: release-haskell: stop building musl integer-simple GHCs integer-simple GHCs appear to be broken when linking against musl and non-static-linking. --- pkgs/top-level/release-haskell.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index c2e81ddbb428..55824ff10001 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -94,13 +94,6 @@ let nixosTests.agda = (packagePlatforms pkgs.nixosTests).agda; agdaPackages = packagePlatforms pkgs.agdaPackages; - 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 = {}; - }; - # top-level packages that depend on haskellPackages inherit (pkgsPlatforms) agda @@ -208,6 +201,18 @@ let elmPackages.elm = pkgsPlatforms.elmPackages.elm; + # GHCs linked to musl. + 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 = {}; + + # remove integer-simple because it appears to be broken with + # musl and non-static-linking. + integer-simple = {}; + }; + # 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) -- cgit 1.4.1 From 5b6f2ae03d2eef42a8ac00a3e567fc20d2c310c3 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 15:18:30 +0900 Subject: release-haskell: build a few haskell packages with musl This is helpful to get a small cache going for people who want musl-enabled packages. --- pkgs/top-level/release-haskell.nix | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 55824ff10001..233da8ee1b6d 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -81,8 +81,16 @@ let recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {}; - staticHaskellPackagesPlatforms = - packagePlatforms pkgs.pkgsStatic.haskell.packages.integer-simple.ghc8104; + removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove; + + removePlatforms = platformsToRemove: packageSet: + lib.mapAttrsRecursive + (_: val: + if lib.isList val + then removeMany platformsToRemove val + else val + ) + packageSet; jobs = recursiveUpdateMany [ (mapTestOn { @@ -213,6 +221,21 @@ let integer-simple = {}; }; + # Get some cache going for MUSL-enabled GHC. + pkgsMusl.haskellPackages = + removePlatforms + [ + "aarch64-linux" # aarch64 does not appear to be supported + "x86_64-darwin" # musl only supports linux + ] + { + inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages) + hello + lens + random + ; + }; + # 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) -- cgit 1.4.1 From f8592f6ba511ecc75c8b51ea84c41d4d2f688591 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sun, 18 Jul 2021 18:15:49 +0900 Subject: release-haskell: add docs for removeMany and removePlatforms --- pkgs/top-level/release-haskell.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 233da8ee1b6d..9ae66ab44149 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -81,8 +81,37 @@ let recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {}; + # Remove multiple elements from a list at once. + # + # removeMany + # :: [a] -- list of elements to remove + # -> [a] -- list of elements from which to remove + # -> [a] + # + # > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"] + # ["x86_64-linux"] removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove; + # Recursively remove platforms from the values in an attribute set. + # + # removePlatforms + # :: [String] + # -> AttrSet + # -> AttrSet + # + # > attrSet = { + # foo = ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]; + # bar.baz = ["aarch64-linux" "x86_64-linux"]; + # bar.quux = ["aarch64-linux" "x86_64-darwin"]; + # } + # > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet + # { + # foo = ["x86_64-linux"]; + # bar = { + # baz = ["x86_64-linux"]; + # quux = []; + # }; + # } removePlatforms = platformsToRemove: packageSet: lib.mapAttrsRecursive (_: val: -- cgit 1.4.1 From aca8a4e36d48d6fb2e1af8718930721002de7f27 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Mon, 19 Jul 2021 13:49:24 +0900 Subject: release-haskell: move back to using accumulateDerivations for staticHaskellPackages --- pkgs/top-level/release-haskell.nix | 39 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 9ae66ab44149..636f0f2b15ec 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -18,18 +18,22 @@ let }; inherit (releaseLib) - pkgs - packagePlatforms + lib mapTestOn - aggregate + packagePlatforms + pkgs ; - inherit (pkgs) lib; - - # helper function which traverses a (nested) set + # Helper function which traverses a (nested) set # of derivations produced by mapTestOn and flattens # it to a list of derivations suitable to be passed # to `releaseTools.aggregate` as constituents. + # Removes all non derivations from the input jobList. + # + # accumulateDerivations :: [ Either Derivation AttrSet ] -> [ Derivation ] + # + # > accumulateDerivations [ drv1 "string" { foo = drv2; bar = { baz = drv3; }; } ] + # [ drv1 drv2 drv3 ] accumulateDerivations = jobList: lib.concatMap ( attrs: @@ -383,25 +387,10 @@ let lib.maintainers.rnhmjoj ]; }; - constituents = [ - # aarch64-linux - # - # TODO: Times out on Hydra - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.aarch64-linux - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.aarch64-linux - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.aarch64-linux - - # x86_64-darwin - # - # TODO: reenable darwin builds if static libiconv works - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.x86_64-darwin - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.x86_64-darwin - # jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.x86_64-darwin - - # x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello.x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.x86_64-linux - jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.x86_64-linux + constituents = accumulateDerivations [ + jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello + jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens + jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random ]; }; } -- cgit 1.4.1 From 95cd2f7a1f7cedaf4fe9b64a9fca8c10afae75b2 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Sat, 24 Jul 2021 21:12:00 +0900 Subject: release-haskell: fix comment on pkgsMusl.haskellPackages --- pkgs/top-level/release-haskell.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 636f0f2b15ec..5173ec6cb361 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -258,8 +258,14 @@ let pkgsMusl.haskellPackages = removePlatforms [ - "aarch64-linux" # aarch64 does not appear to be supported - "x86_64-darwin" # musl only supports linux + # pkgsMusl is compiled natively with musl. It is not + # cross-compiled (unlike pkgsStatic). We can only + # natively bootstrap GHC with musl on x86_64-linux because + # upstream doesn't provide a musl bindist for aarch64. + "aarch64-linux" + + # musl only supports linux, not darwin. + "x86_64-darwin" ] { inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages) -- cgit 1.4.1 From 36628e6e04e22a8b72ea5a07e4973670acabfca9 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 26 Jul 2021 10:47:49 +0200 Subject: pkgsMusl.haskell.compiler.*: use python38 to unbreak build seems like python39 currently fails to build with musl as libc https://github.com/NixOS/nixpkgs/issues/131557. As a workaround, we can just build the musl GHCs using python38 like we have been in the past (the python 3.8 -> 3.9 update being a more recent development). --- pkgs/top-level/haskell-packages.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 86a09b4a1fad..e6a54f0e52d6 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -39,6 +39,12 @@ let # Use this rather than `rec { ... }` below for sake of overlays. inherit (pkgs.haskell) compiler packages; + # temporarily use python 3.8 since 3.9 fails with musl + # https://github.com/NixOS/nixpkgs/issues/131557 + muslArgs = pkgs.lib.optionalAttrs pkgs.stdenv.buildPlatform.isMusl { + python3 = buildPackages.python38; + }; + in { lib = haskellLib; @@ -57,7 +63,7 @@ in { minimal = true; }; - ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix { + ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix ({ # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar # 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 @@ -67,8 +73,8 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_7; llvmPackages = pkgs.llvmPackages_7; - }; - ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix { + } // muslArgs); + ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix ({ # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar # 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 @@ -78,8 +84,8 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_9; llvmPackages = pkgs.llvmPackages_9; - }; - ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix { + } // muslArgs); + ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix ({ # aarch64 ghc8102Binary exceeds max output size on hydra bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 then packages.ghc8102BinaryMinimal @@ -88,14 +94,14 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; - }; - ghcHEAD = callPackage ../development/compilers/ghc/head.nix { + } // muslArgs); + ghcHEAD = callPackage ../development/compilers/ghc/head.nix ({ bootPkgs = packages.ghc901; # no binary yet inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; libffi = pkgs.libffi; - }; + } // muslArgs); # The integer-simple attribute set contains all the GHC compilers # build with integer-simple instead of integer-gmp. -- cgit 1.4.1 From 6d4c440f801a96a19795ee6d04189385f39fc0d3 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 26 Jul 2021 12:33:18 +0200 Subject: Revert "pkgsMusl.haskell.compiler.*: use python38 to unbreak build" This reverts commit 36628e6e04e22a8b72ea5a07e4973670acabfca9. As it turns out this wasn't caused by the update from python 3.8 -> 3.9, but the underlying issue affects both python version (it seems that LTO is at fault currently). Will have to be fixed elsewhere, reverting. --- pkgs/top-level/haskell-packages.nix | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index e6a54f0e52d6..86a09b4a1fad 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -39,12 +39,6 @@ let # Use this rather than `rec { ... }` below for sake of overlays. inherit (pkgs.haskell) compiler packages; - # temporarily use python 3.8 since 3.9 fails with musl - # https://github.com/NixOS/nixpkgs/issues/131557 - muslArgs = pkgs.lib.optionalAttrs pkgs.stdenv.buildPlatform.isMusl { - python3 = buildPackages.python38; - }; - in { lib = haskellLib; @@ -63,7 +57,7 @@ in { minimal = true; }; - ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix ({ + ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix { # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar # 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 @@ -73,8 +67,8 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_7; llvmPackages = pkgs.llvmPackages_7; - } // muslArgs); - ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix ({ + }; + ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix { # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar # 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 @@ -84,8 +78,8 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_9; llvmPackages = pkgs.llvmPackages_9; - } // muslArgs); - ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix ({ + }; + ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix { # aarch64 ghc8102Binary exceeds max output size on hydra bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 then packages.ghc8102BinaryMinimal @@ -94,14 +88,14 @@ in { inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; - } // muslArgs); - ghcHEAD = callPackage ../development/compilers/ghc/head.nix ({ + }; + ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = packages.ghc901; # no binary yet inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; libffi = pkgs.libffi; - } // muslArgs); + }; # The integer-simple attribute set contains all the GHC compilers # build with integer-simple instead of integer-gmp. -- cgit 1.4.1