nixpkgs/pkgs/development/interpreters/perl/builder.sh
Eelco Dolstra a6cf6c23f3 * Perl updated to 5.8.8 (NIXPKGS-56).
* Fix a potential security problem in Cwd in taint mode.

svn path=/nixpkgs/trunk/; revision=8751
2007-05-24 14:41:18 +00:00

25 lines
612 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=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