pkgs/build-support: stdenv.lib -> lib
This commit is contained in:
committed by
Cole Helbling
parent
e8d39a93c2
commit
aa8868c7cc
@@ -6,6 +6,7 @@
|
||||
# compiler and the linker just "work".
|
||||
|
||||
{ name ? ""
|
||||
, lib
|
||||
, stdenvNoCC
|
||||
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
|
||||
, gccForLibs ? null
|
||||
@@ -18,7 +19,7 @@
|
||||
, libcxx ? null
|
||||
}:
|
||||
|
||||
with stdenvNoCC.lib;
|
||||
with lib;
|
||||
|
||||
assert nativeTools -> !propagateDoc && nativePrefix != "";
|
||||
assert !nativeTools ->
|
||||
@@ -34,11 +35,11 @@ let
|
||||
#
|
||||
# TODO(@Ericson2314) Make unconditional, or optional but always true by
|
||||
# default.
|
||||
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
|
||||
targetPrefix = lib.optionalString (targetPlatform != hostPlatform)
|
||||
(targetPlatform.config + "-");
|
||||
|
||||
ccVersion = stdenv.lib.getVersion cc;
|
||||
ccName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName cc);
|
||||
ccVersion = lib.getVersion cc;
|
||||
ccName = lib.removePrefix targetPrefix (lib.getName cc);
|
||||
|
||||
libc_bin = if libc == null then null else getBin libc;
|
||||
libc_dev = if libc == null then null else getDev libc;
|
||||
@@ -247,8 +248,8 @@ stdenv.mkDerivation {
|
||||
|
||||
setupHooks = [
|
||||
../setup-hooks/role.bash
|
||||
] ++ stdenv.lib.optional (cc.langC or true) ./setup-hook.sh
|
||||
++ stdenv.lib.optional (cc.langFortran or false) ./fortran-hook.sh;
|
||||
] ++ lib.optional (cc.langC or true) ./setup-hook.sh
|
||||
++ lib.optional (cc.langFortran or false) ./fortran-hook.sh;
|
||||
|
||||
postFixup =
|
||||
# Ensure flags files exists, as some other programs cat them. (That these
|
||||
@@ -353,7 +354,7 @@ stdenv.mkDerivation {
|
||||
+ optionalString (libcxx.isLLVM or false) (''
|
||||
echo "-isystem ${libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-stdlib=libc++" >> $out/nix-support/libcxx-ldflags
|
||||
'' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux ''
|
||||
'' + lib.optionalString stdenv.targetPlatform.isLinux ''
|
||||
echo "-lc++abi" >> $out/nix-support/libcxx-ldflags
|
||||
'')
|
||||
|
||||
@@ -492,7 +493,7 @@ stdenv.mkDerivation {
|
||||
let cc_ = if cc != null then cc else {}; in
|
||||
(if cc_ ? meta then removeAttrs cc.meta ["priority"] else {}) //
|
||||
{ description =
|
||||
stdenv.lib.attrByPath ["meta" "description"] "System C compiler" cc_
|
||||
lib.attrByPath ["meta" "description"] "System C compiler" cc_
|
||||
+ " (wrapper script)";
|
||||
priority = 10;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user