2005-12-05 06:11:09 -08:00
|
|
|
source $stdenv/setup
|
2003-11-05 04:17:48 -08:00
|
|
|
|
2006-10-27 05:43:32 -07:00
|
|
|
if test "$NIX_ENFORCE_PURITY" = "1"; then
|
2009-10-02 12:05:39 -07:00
|
|
|
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
|
|
|
|
extraflags="-Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
|
2004-03-11 09:26:14 -08:00
|
|
|
fi
|
|
|
|
|
2004-09-18 14:11:58 -07:00
|
|
|
configureScript=./Configure
|
2008-02-22 07:18:22 -08:00
|
|
|
configureFlags="-de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl $extraflags"
|
2004-09-18 14:11:58 -07:00
|
|
|
dontAddPrefix=1
|
|
|
|
|
2007-05-24 07:41:18 -07:00
|
|
|
preBuild() {
|
|
|
|
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
|
|
|
|
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
|
|
|
|
}
|
|
|
|
|
2005-03-10 04:49:37 -08:00
|
|
|
postInstall() {
|
|
|
|
ensureDir "$out/nix-support"
|
|
|
|
cp $setupHook $out/nix-support/setup-hook
|
|
|
|
}
|
|
|
|
|
2006-10-26 03:13:59 -07:00
|
|
|
genericBuild
|