nixUnstable: patch boehmgc (nix#4944)

As has been done in https://github.com/NixOS/nix/pull/4944

This introduces the boehmgc_nix and boehmgc_nixUnstable attributes
which are useful for external packages that link with Nix and its
boehmgc.
This commit is contained in:
Robert Hensing 2021-07-07 22:49:18 +02:00 committed by Jonathan Ringer
parent 2d1568561b
commit 596ac242af
2 changed files with 20 additions and 4 deletions

View file

@ -2,7 +2,8 @@
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
, boehmgc
, boehmgc_nix
, boehmgc_nixUnstable
, Security
}:
@ -209,7 +210,9 @@ in rec {
sha256 = "sha256-ITp9ScRhB5syNh5NAI0kjX9o400syTR/Oo/5Ap+a+10=";
};
inherit storeDir stateDir confDir boehmgc;
boehmgc = boehmgc_nix;
inherit storeDir stateDir confDir;
});
nixUnstable = lib.lowPrio (callPackage common rec {
@ -224,7 +227,9 @@ in rec {
sha256 = "sha256-ARRiLrDOK+JQtvVXsYegspENYimQzilvdTfO7eiBuaA=";
};
inherit storeDir stateDir confDir boehmgc;
boehmgc = boehmgc_nixUnstable;
inherit storeDir stateDir confDir;
});

View file

@ -14669,6 +14669,18 @@ in
boehmgc = callPackage ../development/libraries/boehm-gc { };
boehmgc_766 = callPackage ../development/libraries/boehm-gc/7.6.6.nix { };
boehmgc_nix = pkgs.boehmgc.override {
enableLargeConfig = true;
};
boehmgc_nixUnstable = pkgs.boehmgc_nix.overrideAttrs (drv: {
patches = (drv.patches or []) ++ [
# Part of the GC solution in https://github.com/NixOS/nix/pull/4944
(pkgs.fetchpatch {
url = https://github.com/hercules-ci/nix/raw/5c58d84a76d96f269e3ff1e72c9c9ba5f68576af/boehmgc-coroutine-sp-fallback.diff;
sha256 = "sha256-JvnWVTlkltmQUs/0qApv/LPZ690UX1/2hEP+LYRwKbI=";
})
];
});
boolstuff = callPackage ../development/libraries/boolstuff { };
@ -31157,7 +31169,6 @@ in
inherit (callPackage ../tools/package-management/nix {
storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var";
boehmgc = boehmgc.override { enableLargeConfig = true; };
inherit (darwin.apple_sdk.frameworks) Security;
})
nix