clang: Add compat lib
attribute to have stdenv.cc.cc.lib
always work
Fixes tarball evaluation: http://hydra.nixos.org/build/35042997/nixlog/1/raw
This commit is contained in:
parent
ef44e78849
commit
36c4c73575
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||||
in stdenv.mkDerivation {
|
self = stdenv.mkDerivation {
|
||||||
name = "clang-${version}";
|
name = "clang-${version}";
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
@ -41,6 +41,7 @@ in stdenv.mkDerivation {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
|
||||||
isClang = true;
|
isClang = true;
|
||||||
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||||
inherit gcc;
|
inherit gcc;
|
||||||
@ -52,4 +53,5 @@ in stdenv.mkDerivation {
|
|||||||
license = stdenv.lib.licenses.bsd3;
|
license = stdenv.lib.licenses.bsd3;
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in self
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||||
in stdenv.mkDerivation {
|
self = stdenv.mkDerivation {
|
||||||
name = "clang-${version}";
|
name = "clang-${version}";
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
@ -41,6 +41,7 @@ in stdenv.mkDerivation {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
|
||||||
isClang = true;
|
isClang = true;
|
||||||
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||||
inherit gcc;
|
inherit gcc;
|
||||||
@ -52,4 +53,5 @@ in stdenv.mkDerivation {
|
|||||||
license = stdenv.lib.licenses.bsd3;
|
license = stdenv.lib.licenses.bsd3;
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in self
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||||
in stdenv.mkDerivation {
|
self = stdenv.mkDerivation {
|
||||||
name = "clang-${version}";
|
name = "clang-${version}";
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
@ -41,6 +41,7 @@ in stdenv.mkDerivation {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
|
||||||
isClang = true;
|
isClang = true;
|
||||||
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||||
inherit gcc;
|
inherit gcc;
|
||||||
@ -52,4 +53,5 @@ in stdenv.mkDerivation {
|
|||||||
license = stdenv.lib.licenses.bsd3;
|
license = stdenv.lib.licenses.bsd3;
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in self
|
||||||
|
Loading…
Reference in New Issue
Block a user