diff --git a/pkgs/stdenv/darwin/bootstrap-tools.nix b/pkgs/stdenv/darwin/bootstrap-tools.nix new file mode 100644 index 000000000000..a3a9f17fb809 --- /dev/null +++ b/pkgs/stdenv/darwin/bootstrap-tools.nix @@ -0,0 +1,25 @@ +{ + lib, + stdenv, + bootstrapTools, + unpack, +}: + +builtins.derivation { + inherit (stdenv.hostPlatform) system; + + name = "bootstrap-tools"; + builder = "${unpack}/bin/bash"; + + args = [ + "${unpack}/bootstrap-tools-unpack.sh" + bootstrapTools + ]; + + PATH = lib.makeBinPath [ + (builtins.placeholder "out") + unpack + ]; + + allowedReferences = [ "out" ]; +} diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index ff8299d139b8..0e47fbd8c4de 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -291,23 +291,8 @@ rec { ''; }; - bootstrapTools = derivation { - inherit (stdenv.hostPlatform) system; - - name = "bootstrap-tools"; - builder = "${bootstrapFiles.unpack}/bin/bash"; - - args = [ - "${bootstrapFiles.unpack}/bootstrap-tools-unpack.sh" - bootstrapFiles.bootstrapTools - ]; - - PATH = lib.makeBinPath [ - (placeholder "out") - bootstrapFiles.unpack - ]; - - allowedReferences = [ "out" ]; + bootstrapTools = pkgs.callPackage ./bootstrap-tools.nix { + inherit (bootstrapFiles) bootstrapTools unpack; }; test = derivation {