diff options
author | sternenseemann <sternenseemann@systemli.org> | 2024-04-12 00:14:16 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2024-04-18 20:49:13 +0200 |
commit | b2a568906aff1fe54b65e78b0a1a216247840734 (patch) | |
tree | 24f5602618ece251e1e36e0cb80f1740c7fb0cf8 /pkgs/build-support/bintools-wrapper/default.nix | |
parent | 1486e76262b4079735d31144c4b1d6c1d9b0173c (diff) |
wrapCC, wrapBintools: use runtimeShell instead of stdenv shell
We don't need to artificially make sure that we can execute the wrapper scripts on the build platform by using stdenv's shell (which comes from buildPackages) since our cross infrastructure will get us the wrapper from buildPackages. The upside of this change is that cross-compiled wrappers (e.g. pkgsCross.aarch64-multiplatform.gcc) will actually work when executed! For bootstrapping this is also not a problem, since we have a long build->build platform chain so runtimeShell is just as good as stdenvNoCC.shell. We do fall back to old ways, though, by explicitly using the bootstrap-tools shell in stage2, so the adjacent bash is only used from stage4 onwards. This is unnecessary in principle (I'll try removing this hack in the future), but ensures this change causes zero rebuilds.
Diffstat (limited to 'pkgs/build-support/bintools-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 3c553f181f0dd..7bb96b470687d 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -8,7 +8,8 @@ { name ? "" , lib , stdenvNoCC -, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null +, runtimeShell +, bintools ? null, libc ? null, coreutils ? null, gnugrep ? null , netbsd ? null, netbsdCross ? null , sharedLibraryLoader ? if libc == null then @@ -419,7 +420,8 @@ stdenvNoCC.mkDerivation { env = { # for substitution in utils.bash expandResponseParams = "${expand-response-params}/bin/expand-response-params"; - shell = getBin shell + shell.shellPath or ""; + # TODO(@sternenseemann): rename env var via stdenv rebuild + shell = (getBin runtimeShell + runtimeShell.shellPath or ""); gnugrep_bin = optionalString (!nativeTools) gnugrep; wrapperName = "BINTOOLS_WRAPPER"; inherit dynamicLinker targetPrefix suffixSalt coreutils_bin; |