From 6fff0af6c374a3bb9f93b26aa202ad5f6f60cd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 16 Nov 2014 09:19:11 +0100 Subject: [PATCH] ccache: fix evaluation --- pkgs/development/tools/misc/ccache/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 066087fcd13b..cb3c78c28b49 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -16,11 +16,10 @@ stdenv.mkDerivation { passthru = { # A derivation that provides gcc and g++ commands, but that # will end up calling ccache for the given cacheDir - links = extraConfig : (runCommand "ccache-links" - { inherit (gcc) langC langCC; } + links = extraConfig : (runCommand "ccache-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} @@ -28,7 +27,7 @@ stdenv.mkDerivation { 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}