From b4f66903e3d55fd32061b790ad3080b0c963a5fb Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 24 Aug 2021 00:57:19 +0200 Subject: [PATCH] haskell.compiler.*: make big-parallel Compiling GHC on Hydra takes 3h or more (with -j2) whereas even on an outdated CPU GHC can be compiled in under an hour with -j4. To get a higher NIX_BUILD_CORES value at build time, we'll have to mark GHC big-parallel. --- pkgs/development/compilers/ghc/8.10.6.nix | 4 ++++ pkgs/development/compilers/ghc/8.8.4.nix | 4 ++++ pkgs/development/compilers/ghc/9.0.1.nix | 4 ++++ pkgs/development/compilers/ghc/9.2.1.nix | 4 ++++ pkgs/development/compilers/ghc/head.nix | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/pkgs/development/compilers/ghc/8.10.6.nix b/pkgs/development/compilers/ghc/8.10.6.nix index 859c23a796b7..748116afb105 100644 --- a/pkgs/development/compilers/ghc/8.10.6.nix +++ b/pkgs/development/compilers/ghc/8.10.6.nix @@ -281,6 +281,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 66862fca7318..bb47b1daee47 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -291,6 +291,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index bf94fc3c4d00..c2cc1358e821 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -268,6 +268,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index c77fde7f06e9..46bacd5df1a8 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -268,6 +268,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 6b7d7c21e491..6eefc067d6e8 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -285,6 +285,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc