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; });
This commit is contained in:
Frederik Rietdijk
2019-07-19 11:27:56 +02:00
committed by Frederik Rietdijk
parent 2d5769884d
commit 594ca3f1cf
2 changed files with 4 additions and 6 deletions
@@ -27,12 +27,10 @@ let ccache = stdenv.mkDerivation rec {
doCheck = !stdenv.isDarwin;
passthru = let
unwrappedCC = stdenv.cc.cc;
in {
passthru = {
# A derivation that provides gcc and g++ commands, but that
# will end up calling ccache for the given cacheDir
links = extraConfig: stdenv.mkDerivation rec {
links = {unwrappedCC, extraConfig}: stdenv.mkDerivation rec {
name = "ccache-links";
passthru = {
isClang = unwrappedCC.isClang or false;