nixpkgs/pkgs/development/interpreters/perl/builder.sh
Eelco Dolstra 5e985bc375 * Perl 5.10.0, while we're at it.
svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10808
2008-02-21 16:19:09 +00:00

25 lines
672 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 -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3 -Uinstallusrbinperl $extraflags"
dontAddPrefix=1
preBuild=preBuild
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=postInstall
postInstall() {
ensureDir "$out/nix-support"
cp $setupHook $out/nix-support/setup-hook
}
genericBuild