* Set PERL5LIB automatically in the Perl setup hook.
* Remove explicit setting of PERL5LIB. * Use the generic Perl builder for the BerkeleyDB and XML::Parser modules. * Prefix all names of Perl modules with `perl-' (in the generic Perl builder). svn path=/nixpkgs/trunk/; revision=2365
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
buildinputs="$perl $db4"
|
||||
. $stdenv/setup || exit 1
|
||||
|
||||
tar xvfz $src || exit 1
|
||||
cd BerkeleyDB-* || exit 1
|
||||
|
||||
echo "LIB = $db4/lib" > config.in
|
||||
echo "INCLUDE = $db4/include" >> config.in
|
||||
|
||||
perl Makefile.PL || exit 1
|
||||
make || exit 1
|
||||
make install SITEPREFIX=$out PERLPREFIX=$out || exit 1
|
||||
@@ -1,14 +1,12 @@
|
||||
{stdenv, fetchurl, perl, db4}:
|
||||
{fetchurl, perl, db4}:
|
||||
|
||||
assert perl != null && db4 != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "perl-BerkeleyDB-0.25";
|
||||
builder = ./builder.sh;
|
||||
import ../generic perl {
|
||||
name = "BerkeleyDB-0.26";
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.cs.uu.nl/mirror/CPAN/authors/id/P/PM/PMQS/BerkeleyDB-0.25.tar.gz;
|
||||
md5 = "fcef06232d1ccd6c2a9cd114e388ea3d";
|
||||
url = ftp://ftp.cs.uu.nl/mirror/CPAN/authors/id/P/PM/PMQS/BerkeleyDB-0.26.tar.gz;
|
||||
md5 = "6e9882f4e4bac48b24079d082af30e6c";
|
||||
};
|
||||
perl = perl;
|
||||
db4 = db4;
|
||||
perlPreHook = ./hook.sh;
|
||||
buildInputs = [db4];
|
||||
# inherit db4;
|
||||
}
|
||||
|
||||
7
pkgs/development/perl-modules/BerkeleyDB/hook.sh
Normal file
7
pkgs/development/perl-modules/BerkeleyDB/hook.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
oldPreConfigure=$preConfigure
|
||||
preConfigure=myPreConfigure
|
||||
myPreConfigure() {
|
||||
echo "LIB = $db4/lib" > config.in
|
||||
echo "INCLUDE = $db4/include" >> config.in
|
||||
$oldPreConfigure
|
||||
}
|
||||
Reference in New Issue
Block a user