about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-06-14 13:42:28 +0200
committerGitHub <noreply@github.com>2021-06-14 13:42:28 +0200
commit971c744e40503267f1b95198633e359ef26b8e1f (patch)
treedceda2a8b9a9cc0511197c0d48cb3432ae99227d /pkgs/applications/audio
parent07dc073d755c2a6744c54a6aada9cfae29a5d4e4 (diff)
parentceed1e28400a73e1bb2e18cc20ff1683056e6ab5 (diff)
downloadnixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar.gz
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar.bz2
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar.lz
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar.xz
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.tar.zst
nixlib-971c744e40503267f1b95198633e359ef26b8e1f.zip
Merge pull request #126808 from pmahoney/faust-outside-nix-shell
faust: fix compiler flags when used outside nix shell
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/faust/faust2.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/applications/audio/faust/faust2.nix b/pkgs/applications/audio/faust/faust2.nix
index 995618af4ce5..c1d351fa53e1 100644
--- a/pkgs/applications/audio/faust/faust2.nix
+++ b/pkgs/applications/audio/faust/faust2.nix
@@ -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
       '';
     });