{cc,bintools}-wrapper: use cc pname/version if set
This commit is contained in:
parent
84a105254d
commit
99537e994f
|
@ -34,8 +34,8 @@ let
|
||||||
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
|
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
|
||||||
(targetPlatform.config + "-");
|
(targetPlatform.config + "-");
|
||||||
|
|
||||||
bintoolsVersion = (builtins.parseDrvName bintools.name).version;
|
bintoolsVersion = stdenv.lib.getVersion version;
|
||||||
bintoolsName = (builtins.parseDrvName bintools.name).name;
|
bintoolsName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName bintools);
|
||||||
|
|
||||||
libc_bin = if libc == null then null else getBin libc;
|
libc_bin = if libc == null then null else getBin libc;
|
||||||
libc_dev = if libc == null then null else getDev libc;
|
libc_dev = if libc == null then null else getDev libc;
|
||||||
|
@ -74,7 +74,7 @@ in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = targetPrefix
|
name = targetPrefix
|
||||||
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper")
|
+ (if name != "" then name else "${bintoolsName}-wrapper")
|
||||||
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
|
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
|
@ -35,8 +35,8 @@ let
|
||||||
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
|
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
|
||||||
(targetPlatform.config + "-");
|
(targetPlatform.config + "-");
|
||||||
|
|
||||||
ccVersion = (builtins.parseDrvName cc.name).version;
|
ccVersion = stdenv.lib.getVersion cc;
|
||||||
ccName = (builtins.parseDrvName cc.name).name;
|
ccName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName cc);
|
||||||
|
|
||||||
libc_bin = if libc == null then null else getBin libc;
|
libc_bin = if libc == null then null else getBin libc;
|
||||||
libc_dev = if libc == null then null else getDev libc;
|
libc_dev = if libc == null then null else getDev libc;
|
||||||
|
@ -94,7 +94,7 @@ assert nativePrefix == bintools.nativePrefix;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = targetPrefix
|
name = targetPrefix
|
||||||
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper")
|
+ (if name != "" then name else "${ccName}-wrapper")
|
||||||
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
|
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
Loading…
Reference in New Issue