about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/perl/perl-build.sh14
-rw-r--r--pkgs/stdenv-linux/setup.sh3
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/perl/perl-build.sh b/pkgs/perl/perl-build.sh
index c0f13934450b2..7a925e6dbfd84 100755
--- a/pkgs/perl/perl-build.sh
+++ b/pkgs/perl/perl-build.sh
@@ -7,10 +7,20 @@ cd perl-* || exit 1
 
 # Perl's Configure messes with PATH.  We can't have that, so we patch it.
 # Yeah, this is an ugly hack.
-grep -v '^paths=' Configure > Configure.tmp || exit 1
+cat Configure | \
+ grep -v '^paths=' | \
+ grep -v '^locincpth=' | \
+ grep -v '^xlibpth=' | \
+ grep -v '^glibpth=' | \
+ grep -v '^loclibpth=' | \
+ grep -v '^locincpth=' | \
+ cat > Configure.tmp || exit 1
 mv Configure.tmp Configure || exit 1
 chmod +x Configure || exit 1
 
-./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl || exit 1
+./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \
+ -Dlocincpth="$NIX_LIBC_INCLUDES" \
+ -Dloclibpth="$NIX_LIBC_LIBS" \
+ || exit 1
 make || exit 1
 make install || exit 1
diff --git a/pkgs/stdenv-linux/setup.sh b/pkgs/stdenv-linux/setup.sh
index ce25963e91290..1e7c8b4d2a56d 100644
--- a/pkgs/stdenv-linux/setup.sh
+++ b/pkgs/stdenv-linux/setup.sh
@@ -7,3 +7,6 @@ export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS"
 export NIX_LDFLAGS="-L@GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS -L@GCC@/lib -Wl,-rpath,@GCC@/lib"
 export NIX_CC=@CC@
 export NIX_CXX=@CXX@
+
+export NIX_LIBC_INCLUDES="@GLIBC@/include"
+export NIX_LIBC_LIBS="@GLIBC@/lib"