pkgs.haskell.lib: Add disableParallelBuilding function

This commit is contained in:
Rodney Lorrimar 2024-09-18 12:36:19 +08:00 committed by sternenseemann
parent 3abd3dab62
commit e2d259ebc0
9 changed files with 13 additions and 14 deletions

View File

@ -1076,6 +1076,9 @@ benchmark component.
`disableLibraryProfiling drv`
: Sets the `enableLibraryProfiling` argument to `false` for `drv`.
`disableParallelBuilding drv`
: Sets the `enableParallelBuilding` argument to `false` for `drv`.
#### Library functions in the Haskell package sets {#haskell-package-set-lib-functions}
Some library functions depend on packages from the Haskell package sets. Thus they are

View File

@ -2458,9 +2458,7 @@ self: super: {
# See: https://gitlab.haskell.org/ghc/ghc/-/issues/17188
#
# Overwrite the build cores
raaz = overrideCabal (drv: {
enableParallelBuilding = false;
}) super.raaz;
raaz = disableParallelBuilding super.raaz;
# https://github.com/andreymulik/sdp/issues/3
sdp = disableLibraryProfiling super.sdp;

View File

@ -5,7 +5,6 @@ with haskellLib;
let
inherit (pkgs) lib;
disableParallelBuilding = haskellLib.overrideCabal (drv: { enableParallelBuilding = false; });
in
self: super: {

View File

@ -3,7 +3,6 @@
let
inherit (pkgs) lib;
disableParallelBuilding = haskellLib.overrideCabal (drv: { enableParallelBuilding = false; });
in
self: super: {

View File

@ -15,8 +15,6 @@ let
builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
# Workaround for a ghc-9.6 issue: https://gitlab.haskell.org/ghc/ghc/-/issues/23392
disableParallelBuilding = overrideCabal (drv: { enableParallelBuilding = false; });
in
self: super: {

View File

@ -5,7 +5,6 @@ with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
disableParallelBuilding = haskellLib.overrideCabal (drv: { enableParallelBuilding = false; });
in
self: super: {

View File

@ -2,12 +2,6 @@
with haskellLib;
let
disableParallelBuilding = overrideCabal (drv: {
enableParallelBuilding = false;
});
in
# cabal2nix doesn't properly add dependencies conditional on arch(javascript)
(self: super: {

View File

@ -184,6 +184,13 @@ rec {
markBrokenVersion = version: drv: assert drv.version == version; markBroken drv;
markUnbroken = overrideCabal (drv: { broken = false; });
/* disableParallelBuilding drops the -j<n> option from the GHC
command line for the given package. This can be useful in rare
situations where parallel building of a package causes GHC to
fail for some reason.
*/
disableParallelBuilding = overrideCabal (drv: { enableParallelBuilding = false; });
enableLibraryProfiling = overrideCabal (drv: { enableLibraryProfiling = true; });
disableLibraryProfiling = overrideCabal (drv: { enableLibraryProfiling = false; });

View File

@ -176,6 +176,8 @@ rec {
markBrokenVersion = compose.markBrokenVersion;
markUnbroken = compose.markUnbroken;
disableParallelBuilding = compose.disableParallelBuilding;
enableLibraryProfiling = compose.enableLibraryProfiling;
disableLibraryProfiling = compose.disableLibraryProfiling;