* Install Perl modules in $out/lib/perl5. This is what Perl wants by
default, but it didn't happen in Nixpkgs because the string "perl" appeared in the prefix, and in that case Perl uses $out/lib. * Enable thread-safe Perl while we're at it. svn path=/nixpkgs/branches/stdenv-updates/; revision=15252
This commit is contained in:
parent
8b28c599a3
commit
a98d8aee74
@ -1,18 +0,0 @@
|
|||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
configureFlags="$configureFlags -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
|
|
||||||
|
|
||||||
if test "$NIX_ENFORCE_PURITY" = "1"; then
|
|
||||||
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
|
|
||||||
configureFlags="$configureFlags -Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
configureScript=./Configure
|
|
||||||
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)'"
|
|
||||||
}
|
|
||||||
|
|
||||||
genericBuild
|
|
@ -3,8 +3,6 @@
|
|||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "perl-5.10.0";
|
name = "perl-5.10.0";
|
||||||
|
|
||||||
builder = ./builder.sh;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://cpan/src/perl-5.10.0.tar.gz;
|
url = mirror://cpan/src/perl-5.10.0.tar.gz;
|
||||||
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill";
|
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill";
|
||||||
@ -20,9 +18,32 @@ stdenv.mkDerivation {
|
|||||||
./no-sys-dirs.patch
|
./no-sys-dirs.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Build a thread-safe Perl with a dynamic libperls.o. We need the
|
||||||
|
# "installstyle" option to ensure that modules are put under
|
||||||
|
# $out/lib/perl5 - this is the general default, but because $out
|
||||||
|
# contains the string "perl", Configure would select $out/lib.
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
-de -Dcc=gcc -Uinstallusrbinperl -Duseshrplib
|
-de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib -Dusethreads
|
||||||
-Dprefix=''${out} -Dman1dir=''${out}/share/man/man1 -Dman3dir=''${out}/share/man/man3
|
'';
|
||||||
|
|
||||||
|
configureScript = "./Configure";
|
||||||
|
|
||||||
|
dontAddPrefix = true;
|
||||||
|
|
||||||
|
preConfigure =
|
||||||
|
''
|
||||||
|
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
|
||||||
|
|
||||||
|
if test "$NIX_ENFORCE_PURITY" = "1"; then
|
||||||
|
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
|
||||||
|
configureFlags="$configureFlags -Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
preBuild =
|
||||||
|
''
|
||||||
|
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
|
||||||
|
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
addPerlLibPath () {
|
addPerlLibPath () {
|
||||||
addToSearchPath PERL5LIB $1/lib/site_perl
|
addToSearchPath PERL5LIB $1/lib/perl5/site_perl
|
||||||
}
|
}
|
||||||
|
|
||||||
envHooks=(${envHooks[@]} addPerlLibPath)
|
envHooks=(${envHooks[@]} addPerlLibPath)
|
||||||
|
@ -2105,13 +2105,18 @@ let
|
|||||||
inherit (bleedingEdgeRepos) sourceByName;
|
inherit (bleedingEdgeRepos) sourceByName;
|
||||||
};
|
};
|
||||||
|
|
||||||
perl = if !stdenv.isLinux then sysPerl else realPerl;
|
perl = if !stdenv.isLinux then sysPerl else perlReal;
|
||||||
|
|
||||||
perl58 = if !stdenv.isLinux then sysPerl else
|
perl58 = if !stdenv.isLinux then sysPerl else
|
||||||
import ../development/interpreters/perl-5.8 {
|
import ../development/interpreters/perl-5.8 {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
perlReal = import ../development/interpreters/perl-5.10 {
|
||||||
|
fetchurl = fetchurlBoot;
|
||||||
|
inherit stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
# FIXME: unixODBC needs patching on Darwin (see darwinports)
|
# FIXME: unixODBC needs patching on Darwin (see darwinports)
|
||||||
phpOld = import ../development/interpreters/php {
|
phpOld = import ../development/interpreters/php {
|
||||||
inherit stdenv fetchurl flex bison libxml2 apacheHttpd;
|
inherit stdenv fetchurl flex bison libxml2 apacheHttpd;
|
||||||
@ -2182,11 +2187,6 @@ let
|
|||||||
inherit clisp stdenv fetchurl builderDefs unzip;
|
inherit clisp stdenv fetchurl builderDefs unzip;
|
||||||
};
|
};
|
||||||
|
|
||||||
realPerl = import ../development/interpreters/perl-5.10 {
|
|
||||||
fetchurl = fetchurlBoot;
|
|
||||||
inherit stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
ruby = import ../development/interpreters/ruby {
|
ruby = import ../development/interpreters/ruby {
|
||||||
inherit fetchurl stdenv readline ncurses zlib lib openssl;
|
inherit fetchurl stdenv readline ncurses zlib lib openssl;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user