2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, gccRaw, binutils }:
|
2012-12-22 19:01:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "distcc-masq-${gccRaw.name}";
|
|
|
|
|
2021-07-27 12:34:42 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2012-12-22 19:01:05 +00:00
|
|
|
installPhase = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin
|
2012-12-22 19:01:05 +00:00
|
|
|
|
|
|
|
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
|
2012-12-22 19:01:05 +00:00
|
|
|
ln -s $bin/*-gcc $out/bin/gcc
|
2012-12-22 19:35:51 +00:00
|
|
|
ln -s $bin/*-gcc $out/bin/cc
|
2012-12-22 19:01:05 +00:00
|
|
|
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++
|
2012-12-22 19:01:05 +00:00
|
|
|
done
|
|
|
|
fi
|
2012-12-22 21:04:43 +00:00
|
|
|
|
|
|
|
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
|
2012-12-22 19:01:05 +00:00
|
|
|
'';
|
2016-08-23 00:29:23 +00:00
|
|
|
|
|
|
|
meta = {
|
2021-01-23 12:26:19 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2016-08-23 00:29:23 +00:00
|
|
|
};
|
2012-12-22 19:01:05 +00:00
|
|
|
}
|