diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-04-28 00:08:48 -0400 |
---|---|---|
committer | John Cotton Ericson <jcericson@macos-ny-2.office.obsidian.systems> | 2020-05-12 00:44:44 -0400 |
commit | 1ac5398589916a6a433e845342c9b85c4c52f5dc (patch) | |
tree | 4e525c4c01cdc5a79105de31d962ba024833f69d /pkgs/build-support/setup-hooks | |
parent | f7a93031a284d39e303e98006a82250e3139cee9 (diff) | |
download | nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.gz nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.bz2 nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.lz nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.xz nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.zst nixlib-1ac5398589916a6a433e845342c9b85c4c52f5dc.zip |
*-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.
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r-- | pkgs/build-support/setup-hooks/role.bash | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/build-support/setup-hooks/role.bash b/pkgs/build-support/setup-hooks/role.bash index 6f1c36f5c050..cf69e732e7c3 100644 --- a/pkgs/build-support/setup-hooks/role.bash +++ b/pkgs/build-support/setup-hooks/role.bash @@ -3,21 +3,17 @@ # derivation) in which the derivation is used. # # The role is intened to be use as part of other variables names like -# - $NIX_${role_pre}_SOMETHING -# - $NIX_SOMETHING_${role_post} +# - $NIX_SOMETHING${role_post} function getRole() { case $1 in -1) - role_pre='BUILD_' role_post='_FOR_BUILD' ;; 0) - role_pre='' role_post='' ;; 1) - role_pre='TARGET_' role_post='_FOR_TARGET' ;; *) @@ -54,18 +50,18 @@ function getTargetRoleEnvHook() { } # This variant is inteneded specifically for code-prodocing tool wrapper scripts -# `NIX_@wrapperName@_@infixSalt@_TARGET_*` tracks this (needs to be an exported +# `NIX_@wrapperName@_TARGET_*_@suffixSalt@` tracks this (needs to be an exported # env var so can't use fancier data structures). function getTargetRoleWrapper() { case $targetOffset in -1) - export NIX_@wrapperName@_@infixSalt@_TARGET_BUILD=1 + export NIX_@wrapperName@_TARGET_BUILD_@suffixSalt@=1 ;; 0) - export NIX_@wrapperName@_@infixSalt@_TARGET_HOST=1 + export NIX_@wrapperName@_TARGET_HOST_@suffixSalt@=1 ;; 1) - export NIX_@wrapperName@_@infixSalt@_TARGET_TARGET=1 + export NIX_@wrapperName@_TARGET_TARGET_@suffixSalt@=1 ;; *) echo "@name@: used as improper sort of dependency" >2 |