summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@users.noreply.github.com>2016-05-14 06:25:34 +0200
committerJoachim Fasting <joachifm@users.noreply.github.com>2016-05-14 06:25:34 +0200
commit3f0518ac4da155faaeb9b9fc3e81d11778f73448 (patch)
tree9f1889e7c95f39926c5bde57a84227decaf99774 /pkgs/development/tools/misc
parent4e9833d9e8e7bb449ca897d1f7e9db48fbf8aa53 (diff)
parentf4a2ea2203cd7aac3b3672f1ebec8d64d193f3ac (diff)
downloadnixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar.gz
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar.bz2
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar.lz
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar.xz
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.tar.zst
nixpkgs-3f0518ac4da155faaeb9b9fc3e81d11778f73448.zip
Merge pull request #15378 from aneeshusa/add-lib-output-for-ccacheStdenv
ccacheStdenv: inherit lib output from wrapped gcc
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/ccache/default.nix14
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 f344156f6bc..bc1f348040c 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; {