1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/development/tools/misc/distcc/masq.nix

45 lines
847 B
Nix
Raw Normal View History

{ stdenv, gccRaw, binutils }:
stdenv.mkDerivation {
name = "distcc-masq-${gccRaw.name}";
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
bin=${gccRaw}/bin
shopt -s nullglob
if [ -f $bin/gcc ]; then
ln -s $bin/gcc $out/bin
else
2012-12-22 19:35:51 +00:00
for a in $bin/*-gcc; do
ln -s $bin/*-gcc $out/bin/gcc
2012-12-22 19:35:51 +00:00
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++
2012-12-22 19:35:51 +00:00
ln -sf $bin/*-g++ $out/bin/c++
done
fi
bbin=${binutils}/bin
if [ -f $bbin/as ]; then
ln -s $bbin/as $out/bin
else
for a in $bbin/*-as; do
ln -sf $bbin/*-as $out/bin/as
done
fi
'';
2016-08-23 01:29:23 +01:00
meta = {
platforms = stdenv.lib.platforms.linux;
};
}