@@ -19,7 +19,7 @@ in with pkgs; rec {
1919 tarMinimal = gnutar.override { acl = null; };
2020
2121 busyboxMinimal = busybox.override {
22− useMusl = !targetPlatform.isRiscV;
22+ useMusl = !stdenv.targetPlatform.isRiscV;
2323 enableStatic = true;
2424 enableMinimal = true;
2525 extraConfig = ''
@@ -44,7 +44,7 @@ in with pkgs; rec {
4444 set -x
4545 mkdir -p $out/bin $out/lib $out/libexec
4646
47− '' + (if (hostPlatform.libc == "glibc") then ''
47+ '' + (if (stdenv.hostPlatform.libc == "glibc") then ''
4848 # Copy what we need of Glibc.
4949 cp -d ${libc.out}/lib/ld*.so* $out/lib
5050 cp -d ${libc.out}/lib/libc*.so* $out/lib
@@ -75,7 +75,7 @@ in with pkgs; rec {
7575 find $out/include -name .install -exec rm {} \;
7676 find $out/include -name ..install.cmd -exec rm {} \;
7777 mv $out/include $out/include-glibc
78− '' else if (hostPlatform.libc == "musl") then ''
78+ '' else if (stdenv.hostPlatform.libc == "musl") then ''
7979 # Copy what we need from musl
8080 cp ${libc.out}/lib/* $out/lib
8181 cp -rL ${libc.dev}/include $out
@@ -137,7 +137,7 @@ in with pkgs; rec {
137137 cp -d ${zlib.out}/lib/libz.so* $out/lib
138138 cp -d ${libelf}/lib/libelf.so* $out/lib
139139
140− '' + lib.optionalString (hostPlatform != buildPlatform) ''
140+ '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
141141 # These needed for cross but not native tools because the stdenv
142142 # GCC has certain things built in statically. See
143143 # pkgs/stdenv/linux/default.nix for the details.
@@ -199,21 +199,21 @@ in with pkgs; rec {
199199 bootstrapTools = runCommand "bootstrap-tools.tar.xz" {} "cp ${build}/on-server/bootstrap-tools.tar.xz $out";
200200 };
201201
202− bootstrapTools = if (hostPlatform.libc == "glibc") then
202+ bootstrapTools = if (stdenv.hostPlatform.libc == "glibc") then
203203 import ./bootstrap-tools {
204− inherit (hostPlatform) system;
204+ inherit (stdenv.hostPlatform) system;
205205 inherit bootstrapFiles;
206206 }
207− else if (hostPlatform.libc == "musl") then
207+ else if (stdenv.hostPlatform.libc == "musl") then
208208 import ./bootstrap-tools-musl {
209− inherit (hostPlatform) system;
209+ inherit (stdenv.hostPlatform) system;
210210 inherit bootstrapFiles;
211211 }
212212 else throw "unsupported libc";
213213
214214 test = derivation {
215215 name = "test-bootstrap-tools";
216− inherit (hostPlatform) system;
216+ inherit (stdenv.hostPlatform) system;
217217 builder = bootstrapFiles.busybox;
218218 args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ];
219219
@@ -232,12 +232,12 @@ in with pkgs; rec {
232232 grep --version
233233 gcc --version
234234
235− '' + lib.optionalString (hostPlatform.libc == "glibc") ''
235+ '' + lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
236236 ldlinux=$(echo ${bootstrapTools}/lib/ld-linux*.so.?)
237237 export CPP="cpp -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools}"
238238 export CC="gcc -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
239239 export CXX="g++ -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
240− '' + lib.optionalString (hostPlatform.libc == "musl") ''
240+ '' + lib.optionalString (stdenv.hostPlatform.libc == "musl") ''
241241 ldmusl=$(echo ${bootstrapTools}/lib/ld-musl*.so.?)
242242 export CPP="cpp -idirafter ${bootstrapTools}/include-libc -B${bootstrapTools}"
243243 export CC="gcc -idirafter ${bootstrapTools}/include-libc -B${bootstrapTools} -Wl,-dynamic-linker,$ldmusl -Wl,-rpath,${bootstrapTools}/lib"