*-wrapper; Switch from infixSalt to suffixSalt
I hate the thing too even though I made it, and rather just get rid of it. But we can't do that yet. In the meantime, this brings us more inline with autoconf and will make it slightly easier for me to write a pkg-config wrapper, which we need.
This commit is contained in:
committed by
John Cotton Ericson
parent
f7a93031a2
commit
1ac5398589
@@ -45,7 +45,7 @@ let
|
||||
coreutils_bin = if nativeTools then "" else getBin coreutils;
|
||||
|
||||
# See description in cc-wrapper.
|
||||
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||
suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||
|
||||
# The dynamic linker has different names on different platforms. This is a
|
||||
# shell glob that ought to match it.
|
||||
@@ -83,7 +83,7 @@ stdenv.mkDerivation {
|
||||
shell = getBin shell + shell.shellPath or "";
|
||||
gnugrep_bin = if nativeTools then "" else gnugrep;
|
||||
|
||||
inherit targetPrefix infixSalt;
|
||||
inherit targetPrefix suffixSalt;
|
||||
|
||||
outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info");
|
||||
|
||||
@@ -95,9 +95,9 @@ stdenv.mkDerivation {
|
||||
(mapc
|
||||
(lambda (arg)
|
||||
(when (file-directory-p (concat arg "/lib"))
|
||||
(setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib")))
|
||||
(setenv "NIX_LDFLAGS_${suffixSalt}" (concat (getenv "NIX_LDFLAGS_${suffixSalt}") " -L" arg "/lib")))
|
||||
(when (file-directory-p (concat arg "/lib64"))
|
||||
(setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib64"))))
|
||||
(setenv "NIX_LDFLAGS_${suffixSalt}" (concat (getenv "NIX_LDFLAGS_${suffixSalt}") " -L" arg "/lib64"))))
|
||||
'(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user