mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 13:13:33 +00:00
32 lines
597 B
Nix
32 lines
597 B
Nix
{ stdenv, gccRaw }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "distcc-masq-${gccRaw.name}";
|
|
|
|
phases = [ "installPhase" ];
|
|
installPhase = ''
|
|
ensureDir $out/bin
|
|
|
|
bin=${gccRaw}/bin
|
|
|
|
shopt -s nullglob
|
|
if [ -f $bin/gcc ]; then
|
|
ln -s $bin/gcc $out/bin
|
|
else
|
|
for a in $bin/*-gcc; do
|
|
ln -s $bin/*-gcc $out/bin/gcc
|
|
ln -s $bin/*-gcc $out/bin/cc
|
|
done
|
|
fi
|
|
|
|
if [ -f $bin/g++ ]; then
|
|
ln -s $bin/g++ $out/bin
|
|
else
|
|
for a in $bin/*-g++; do
|
|
ln -sf $bin/*-g++ $out/bin/g++
|
|
ln -sf $bin/*-g++ $out/bin/c++
|
|
done
|
|
fi
|
|
'';
|
|
}
|