nixpkgs/pkgs/development/interpreters/perl-5.8/builder.sh
Lluís Batlle i Rossell e5654ae80f Reverting simons' r17618, which causes a major stdenv rebuild.
svn path=/nixpkgs/trunk/; revision=17622
2009-10-02 19:05:39 +00:00

23 lines
570 B
Bash

source $stdenv/setup
if test "$NIX_ENFORCE_PURITY" = "1"; then
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
extraflags="-Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
fi
configureScript=./Configure
configureFlags="-de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl $extraflags"
dontAddPrefix=1
preBuild() {
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
}
postInstall() {
ensureDir "$out/nix-support"
cp $setupHook $out/nix-support/setup-hook
}
genericBuild