diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index 79bf21ab47308..7c1adc96d786a 100644 --- a/pkgs/stdenv/generic/builder.sh +++ b/pkgs/stdenv/generic/builder.sh @@ -1,3 +1,5 @@ +source .attrs.sh + export PATH= for i in $initialPath; do if [ "$i" = / ]; then i=; fi diff --git a/pkgs/stdenv/generic/default-builder.sh b/pkgs/stdenv/generic/default-builder.sh index 273fc55c75523..9c50911ee4aae 100644 --- a/pkgs/stdenv/generic/default-builder.sh +++ b/pkgs/stdenv/generic/default-builder.sh @@ -1,2 +1,3 @@ +source .attrs.sh source $stdenv/setup genericBuild diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 1ef2ab52029b4..cce5976e756f6 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -79,6 +79,7 @@ let builder = shell; args = ["-e" ./builder.sh]; + __structuredAttrs = true; setup = setupScript; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index be79e7626c55b..1f6a11f494b80 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -199,6 +199,7 @@ in rec { builder = attrs.realBuilder or stdenv.shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; inherit stdenv; + __structuredAttrs = true; # The `system` attribute of a derivation has special meaning to Nix. # Derivations set it to choose what sort of machine could be used to diff --git a/pkgs/stdenv/linux/bootstrap-tools/default.nix b/pkgs/stdenv/linux/bootstrap-tools/default.nix index 6118585d545f9..fc39bedade2b9 100644 --- a/pkgs/stdenv/linux/bootstrap-tools/default.nix +++ b/pkgs/stdenv/linux/bootstrap-tools/default.nix @@ -3,11 +3,12 @@ derivation { name = "bootstrap-tools"; - builder = bootstrapFiles.busybox; + builder = "${bootstrapFiles.busybox}"; args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; tarball = bootstrapFiles.bootstrapTools; +# __structuredAttrs = true; inherit system; diff --git a/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh index 64583f80fa8f2..7506d7c26bb29 100644 --- a/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh @@ -1,5 +1,6 @@ # Unpack the bootstrap tools tarball. echo Unpacking the bootstrap tools... +# . ./.attrs.sh $builder mkdir $out < $tarball $builder unxz | $builder tar x -C $out diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 8d513625df21d..b41b4faa11c56 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -217,6 +217,7 @@ in with pkgs; rec { inherit (stdenv.hostPlatform) system; # We cannot "cross test" builder = bootstrapFiles.busybox; args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ]; + __structuredAttrs = true; buildCommand = '' export PATH=${bootstrapTools}/bin