about summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-04-28 12:46:43 +0200
committerregnat <rg@regnat.ovh>2021-04-28 12:46:43 +0200
commit4105c06bf384de1d4da4459bfcc634bcca85ecca (patch)
tree773974f13a1383285b094302ee7ec77b756750d6 /pkgs/stdenv
parent14f66d60a789da5cc48d0602b390a267f016143d (diff)
Also make the bootstrap tools generation CA
(And fix an ofborg eval error btw)
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/linux/make-bootstrap-tools.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix
index e4db92b7717c2..4db40a2e516b2 100644
--- a/pkgs/stdenv/linux/make-bootstrap-tools.nix
+++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix
@@ -224,15 +224,24 @@ in with pkgs; rec {
     bootstrapTools = runCommand "bootstrap-tools.tar.xz" {} "cp ${build}/on-server/bootstrap-tools.tar.xz $out";
   };
 
-  bootstrapTools = if (stdenv.hostPlatform.libc == "glibc") then
+  bootstrapTools =
+    let extraAttrs = lib.optionalAttrs
+      (config.contentAddressedByDefault or false)
+      {
+        __contentAddressed = true;
+        outputHashAlgo = "sha256";
+        outputHashMode = "recursive";
+      };
+    in
+    if (stdenv.hostPlatform.libc == "glibc") then
     import ./bootstrap-tools {
       inherit (stdenv.buildPlatform) system; # Used to determine where to build
-      inherit bootstrapFiles;
+      inherit bootstrapFiles extraAttrs;
     }
     else if (stdenv.hostPlatform.libc == "musl") then
     import ./bootstrap-tools-musl {
       inherit (stdenv.buildPlatform) system; # Used to determine where to build
-      inherit bootstrapFiles;
+      inherit bootstrapFiles extraAttrs;
     }
     else throw "unsupported libc";