*-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
@@ -53,12 +53,12 @@ let
|
||||
"-isystem ${libcxx}/include/c++/v1"
|
||||
else "";
|
||||
|
||||
# The "infix salt" is a arbitrary string added in the middle of env vars
|
||||
# The "suffix salt" is a arbitrary string added in the end of env vars
|
||||
# defined by cc-wrapper's hooks so that multiple cc-wrappers can be used
|
||||
# without interfering. For the moment, it is defined as the target triple,
|
||||
# adjusted to be a valid bash identifier. This should be considered an
|
||||
# unstable implementation detail, however.
|
||||
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||
suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||
|
||||
expand-response-params =
|
||||
if buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null"
|
||||
@@ -105,7 +105,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" "info" ];
|
||||
|
||||
@@ -122,7 +122,7 @@ stdenv.mkDerivation {
|
||||
(mapc
|
||||
(lambda (arg)
|
||||
(when (file-directory-p (concat arg "/include"))
|
||||
(setenv "NIX_${infixSalt}_CFLAGS_COMPILE" (concat (getenv "NIX_${infixSalt}_CFLAGS_COMPILE") " -isystem " arg "/include"))))
|
||||
(setenv "NIX_CFLAGS_COMPILE_${suffixSalt}" (concat (getenv "NIX_CFLAGS_COMPILE_${suffixSalt}") " -isystem " arg "/include"))))
|
||||
'(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user