diff options
author | regnat <rg@regnat.ovh> | 2021-04-26 17:21:17 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-04-28 10:25:49 +0200 |
commit | 14f66d60a789da5cc48d0602b390a267f016143d (patch) | |
tree | f7edeac77c0d8c7d344df394dcda07f8835be9eb /pkgs/stdenv/freebsd/default.nix | |
parent | 559c5792ef1d0ef413e0abd5ddd07409989ceb1c (diff) |
Make the bootsrap respect the contentAddressedByDefault setting
Patch every `derivation` call in the bootsrap process to add it a conditional `__contentAddressed` parameter. That way, passing `contentAddressedByDefault` means that the entire build closure of a system can be content addressed
Diffstat (limited to 'pkgs/stdenv/freebsd/default.nix')
-rw-r--r-- | pkgs/stdenv/freebsd/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix index 9a890532b790f..ddcdc6a66e087 100644 --- a/pkgs/stdenv/freebsd/default.nix +++ b/pkgs/stdenv/freebsd/default.nix @@ -170,7 +170,7 @@ in ({}: { __raw = true; - bootstrapTools = derivation { + bootstrapTools = derivation ({ inherit system; inherit make bash coreutils findutils diffutils grep patch gawk cpio sed @@ -182,7 +182,11 @@ in buildInputs = [ make ]; mkdir = "/bin/mkdir"; ln = "/bin/ln"; - }; + } // lib.optionalAttrs (config.contentAddressedByDefault or false) { + __contentAddressed = true; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + }); }) ({ bootstrapTools, ... }: rec { |