diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-05-11 00:45:41 -0400 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-05-11 00:45:41 -0400 |
commit | f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac (patch) | |
tree | 5b49cdf0ee44b5657f3c981f241c20d15e48110f /pkgs/development/tools/misc/ccache | |
parent | 23f1659ab2cbe06c772c927a9fc8b4d7c2024dbc (diff) | |
download | nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar.gz nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar.bz2 nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar.lz nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar.xz nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.tar.zst nixlib-f4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac.zip |
ccacheStdenv: inherit lib output from wrapped gcc
Diffstat (limited to 'pkgs/development/tools/misc/ccache')
-rw-r--r-- | pkgs/development/tools/misc/ccache/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index f344156f6bc5..bc1f348040cd 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -20,9 +20,14 @@ let ccache = stdenv.mkDerivation rec { 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" - { passthru.gcc = gcc; passthru.isGNU = true; } - '' + links = extraConfig: stdenv.mkDerivation rec { + name = "ccache-links"; + passthru = { + inherit gcc; + isGNU = true; + }; + inherit (gcc.cc) lib; + buildCommand = '' mkdir -p $out/bin if [ -x "${gcc.cc}/bin/gcc" ]; then cat > $out/bin/gcc << EOF @@ -48,7 +53,8 @@ let ccache = stdenv.mkDerivation rec { for file in $(ls ${gcc.cc} | grep -vw bin); do ln -s ${gcc.cc}/$file $out/$file done - ''); + ''; + }; }; meta = with stdenv.lib; { |