bintools-wrapper, cc-wrapper: don't add targetPrefix the second time

... binutils and gcc add it already anyway.

Without this it's easy to get cross-toolchain paths longer than 256
chars and nix-daemon will then fail to commit them to /nix/store on XFS.
This commit is contained in:
Jan Malakhovski 2018-04-15 00:00:01 +00:00
parent 2afd3c901e
commit 82dd4501f4
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ in
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper")
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
preferLocalBuild = true;

View File

@ -71,7 +71,7 @@ assert nativePrefix == bintools.nativePrefix;
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${ccName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper")
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
preferLocalBuild = true;