diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 19a5afee1fb8..e0ee3dae41fb 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -14,7 +14,7 @@ , propagateDoc ? cc != null && cc ? man , extraTools ? [], extraPackages ? [], extraBuildCommands ? "" , nixSupport ? {} -, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null +, isGNU ? false, isClang ? cc.isClang or false, isCcache ? cc.isCcache or false, gnugrep ? null , buildPackages ? {} , libcxx ? null , grossHackForStagingNext ? false @@ -208,7 +208,7 @@ stdenv.mkDerivation { local dst="$1" local wrapper="$2" export prog="$3" - export use_response_file_by_default=${if isClang then "1" else "0"} + export use_response_file_by_default=${if isClang && !isCcache then "1" else "0"} substituteAll "$wrapper" "$out/bin/$dst" chmod +x "$out/bin/$dst" } diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index ef498f6f6e08..7e9ee0cda050 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -79,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: { passthru = { isClang = unwrappedCC.isClang or false; isGNU = unwrappedCC.isGNU or false; + isCcache = true; }; inherit (unwrappedCC) lib; nativeBuildInputs = [ makeWrapper ];