ccacheStdenv: inherit lib output from wrapped gcc
This commit is contained in:
parent
23f1659ab2
commit
f4a2ea2203
|
@ -20,9 +20,14 @@ let ccache = stdenv.mkDerivation rec {
|
||||||
passthru = {
|
passthru = {
|
||||||
# A derivation that provides gcc and g++ commands, but that
|
# A derivation that provides gcc and g++ commands, but that
|
||||||
# will end up calling ccache for the given cacheDir
|
# will end up calling ccache for the given cacheDir
|
||||||
links = extraConfig: (runCommand "ccache-links"
|
links = extraConfig: stdenv.mkDerivation rec {
|
||||||
{ passthru.gcc = gcc; passthru.isGNU = true; }
|
name = "ccache-links";
|
||||||
''
|
passthru = {
|
||||||
|
inherit gcc;
|
||||||
|
isGNU = true;
|
||||||
|
};
|
||||||
|
inherit (gcc.cc) lib;
|
||||||
|
buildCommand = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
if [ -x "${gcc.cc}/bin/gcc" ]; then
|
if [ -x "${gcc.cc}/bin/gcc" ]; then
|
||||||
cat > $out/bin/gcc << EOF
|
cat > $out/bin/gcc << EOF
|
||||||
|
@ -48,7 +53,8 @@ let ccache = stdenv.mkDerivation rec {
|
||||||
for file in $(ls ${gcc.cc} | grep -vw bin); do
|
for file in $(ls ${gcc.cc} | grep -vw bin); do
|
||||||
ln -s ${gcc.cc}/$file $out/$file
|
ln -s ${gcc.cc}/$file $out/$file
|
||||||
done
|
done
|
||||||
'');
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in New Issue