1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/tools/system/plan9port/builder.sh
Kovacsics Robert (NixOS-SSD2) d6e1ee5651 plan9port: fix interpreter paths, add perl
Fixing interpreter paths was done by exporting PLAN9_TARGET, which
INSTALL looks at. Giving $PLAN9 to INSTALL does not achieve this, as
INSTALL only looks at its first argument so I removed the other
arguments to avoid confusion.

Perl is an optional dependency for a script that adds URLs to man pages,
I have added it to get fewer errors during install.
2015-09-10 13:50:51 +01:00

36 lines
617 B
Bash

source $stdenv/setup
export PLAN9=$out/plan9
export PLAN9_TARGET=$PLAN9
configurePhase()
{
echo CFLAGS=\"-I${fontconfig}/include -I${libXt}/include\" > LOCAL.config
echo X11=\"${libXt}/include\" >> LOCAL.config
for f in `grep -l -r /usr/local/plan9`; do
sed "s,/usr/local/plan9,${PLAN9},g" -i $f
done
}
buildPhase()
{
mkdir -p $PLAN9
./INSTALL -b
}
installPhase()
{
./INSTALL -c
# Copy sources
cp -R * $PLAN9
# Copy the `9' utility. This way you can use
# $ 9 awk
# to use the plan 9 awk
mkdir $out/bin
ln -s $PLAN9/bin/9 $out/bin
}
genericBuild