diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-08-10 21:24:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-10 21:24:07 +0100 |
commit | bd41e827dedf756141471e26fd1903ee7b80501d (patch) | |
tree | eefaf8e01d3818a866fa25099763d375b5a83cd7 /pkgs | |
parent | 637cea679d0598b5ab69999c57a68b94bc3a0158 (diff) | |
parent | 031eb79a0b99b75577b375a503368a680f7389c1 (diff) | |
download | nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar.gz nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar.bz2 nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar.lz nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar.xz nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.tar.zst nixlib-bd41e827dedf756141471e26fd1903ee7b80501d.zip |
Merge pull request #28103 from volth/patch-10
ccacheWrapper: extraConfig does not handle special characters
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/misc/ccache/default.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 765fdfb2ea45..65c7e633f8e2 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, runCommand, zlib }: +{ stdenv, fetchurl, fetchpatch, runCommand, zlib, makeWrapper }: let ccache = stdenv.mkDerivation rec { name = "ccache-${version}"; @@ -32,18 +32,16 @@ let ccache = stdenv.mkDerivation rec { isGNU = unwrappedCC.isGNU or false; }; inherit (unwrappedCC) lib; + nativeBuildInputs = [ makeWrapper ]; buildCommand = '' mkdir -p $out/bin wrap() { local cname="$1" if [ -x "${unwrappedCC}/bin/$cname" ]; then - cat > $out/bin/$cname << EOF - #!/bin/sh - ${extraConfig} - exec ${ccache}/bin/ccache ${unwrappedCC}/bin/$cname "\$@" - EOF - chmod +x $out/bin/$cname + makeWrapper ${ccache}/bin/ccache $out/bin/$cname \ + --run ${stdenv.lib.escapeShellArg extraConfig} \ + --add-flags ${unwrappedCC}/bin/$cname fi } |