mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
Merge pull request #126808 from pmahoney/faust-outside-nix-shell
faust: fix compiler flags when used outside nix shell
This commit is contained in:
commit
971c744e40
|
@ -178,6 +178,12 @@ let
|
|||
|
||||
# export parts of the build environment
|
||||
for script in "$out"/bin/*; do
|
||||
# e.g. NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
|
||||
nix_cc_wrapper_target_host="$(printenv | grep ^NIX_CC_WRAPPER_TARGET_HOST | sed 's/=.*//')"
|
||||
|
||||
# e.g. NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
|
||||
nix_bintools_wrapper_target_host="$(printenv | grep ^NIX_BINTOOLS_WRAPPER_TARGET_HOST | sed 's/=.*//')"
|
||||
|
||||
wrapProgram "$script" \
|
||||
--set FAUSTLDDIR "${faust}/lib" \
|
||||
--set FAUSTLIB "${faust}/share/faust" \
|
||||
|
@ -187,7 +193,9 @@ let
|
|||
--prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \
|
||||
--set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \
|
||||
--set NIX_LDFLAGS "$NIX_LDFLAGS -lpthread" \
|
||||
--prefix LIBRARY_PATH $libPath
|
||||
--set "$nix_cc_wrapper_target_host" "''${!nix_cc_wrapper_target_host}" \
|
||||
--set "$nix_bintools_wrapper_target_host" "''${!nix_bintools_wrapper_target_host}" \
|
||||
--prefix LIBRARY_PATH "$libPath"
|
||||
done
|
||||
'';
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue