distcc: fix evaluation (fixes #5002)

This commit is contained in:
Aristid Breitkreuz 2014-11-16 13:52:17 +01:00
parent b69238542c
commit 1dfd467c14

View File

@ -41,11 +41,10 @@ let
#
# extraConfig is meant to be sh lines exporting environment
# variables like DISTCC_HOSTS, DISTCC_DIR, ...
links = extraConfig : (runCommand "distcc-links"
{ inherit (gcc) langC langCC; }
links = extraConfig : (runCommand "distcc-links" { }
''
mkdir -p $out/bin
if [ $langC -eq 1 ]; then
if [ -x "${gcc.gcc}/bin/gcc" ]; then
cat > $out/bin/gcc << EOF
#!/bin/sh
${extraConfig}
@ -53,7 +52,7 @@ let
EOF
chmod +x $out/bin/gcc
fi
if [ $langCC -eq 1 ]; then
if [ -x "${gcc.gcc}/bin/g++" ]; then
cat > $out/bin/g++ << EOF
#!/bin/sh
${extraConfig}