ccache.links: make it a function of unwrappedCC

That way we can use a ccacheStdenv with e.g. a different CC:

stdenv = overrideCC gcc8Stdenv (ccacheWrapper.override { unwrappedCC
= gcc8Stdenv.cc.cc; });

authored by

Frederik Rietdijk and committed by
Frederik Rietdijk
594ca3f1 2d576988

+4 -6
+2 -4
pkgs/development/tools/misc/ccache/default.nix
··· 27 27 28 28 doCheck = !stdenv.isDarwin; 29 29 30 - passthru = let 31 - unwrappedCC = stdenv.cc.cc; 32 - in { 30 + passthru = { 33 31 # A derivation that provides gcc and g++ commands, but that 34 32 # will end up calling ccache for the given cacheDir 35 - links = extraConfig: stdenv.mkDerivation rec { 33 + links = {unwrappedCC, extraConfig}: stdenv.mkDerivation rec { 36 34 name = "ccache-links"; 37 35 passthru = { 38 36 isClang = unwrappedCC.isClang or false;
+2 -2
pkgs/top-level/all-packages.nix
··· 9009 9009 # }; 9010 9010 # You can use a different directory, but whichever directory you choose 9011 9011 # should be owned by user root, group nixbld with permissions 0770. 9012 - ccacheWrapper = makeOverridable ({ extraConfig ? "" }: 9013 - wrapCC (ccache.links extraConfig)) {}; 9012 + ccacheWrapper = makeOverridable ({ extraConfig ? "", unwrappedCC ? stdenv.cc.cc }: 9013 + wrapCC (ccache.links {inherit unwrappedCC extraConfig;})) {}; 9014 9014 ccacheStdenv = lowPrio (overrideCC stdenv buildPackages.ccacheWrapper); 9015 9015 9016 9016 cccc = callPackage ../development/tools/analysis/cccc { };