* 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:
Eelco Dolstra
2005-03-10 12:49:37 +00:00
parent 93e16516a7
commit 8a282aa46c
33 changed files with 91 additions and 138 deletions
@@ -1,8 +1,6 @@
. $stdenv/setup
. $makeWrapper
export PERL5LIB=$perlXMLParser/lib/site_perl:$PERL5LIB
export MONO_GAC_PREFIX=$monodoc:$gtksharp
postInstall=postInstall
@@ -19,11 +19,10 @@ stdenv.mkDerivation {
patches = [./prefix.patch];
buildInputs = [
file mono gtksharp gtksourceviewsharp perl pkgconfig
file mono gtksharp gtksourceviewsharp perl perlXMLParser pkgconfig
glib gtk gconf gnomevfs libbonobo libglade libgnome
gtkmozembedsharp monodoc
];
inherit perlXMLParser mozilla monodoc
gtksharp gtkmozembedsharp gtksourceviewsharp;
inherit mozilla monodoc gtksharp gtkmozembedsharp gtksourceviewsharp;
}
@@ -1,7 +1,5 @@
. $stdenv/setup
export PERL5LIB=$perlXMLParser/lib/site_perl:$PERL5LIB
# !!! hack
NIX_LDFLAGS="$NIX_LDFLAGS -rpath $libXext/lib"
+2 -2
View File
@@ -29,10 +29,10 @@ stdenv.mkDerivation {
md5 = "dd7b3d920509709692c41c9c6c767746";
};
inherit teletextSupport jpegSupport pngSupport libXext perlXMLParser;
inherit teletextSupport jpegSupport pngSupport libXext;
buildInputs = [
pkgconfig perl python x11 libXv libXmu libgnomeui
pkgconfig perl perlXMLParser python x11 libXv libXmu libgnomeui
libglade scrollkeeper esound gettext
(if teletextSupport then zvbi else null)
(if jpegSupport then libjpeg else null)
@@ -9,4 +9,10 @@ configureScript=./Configure
configureFlags="-de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl $extraflags"
dontAddPrefix=1
postInstall() {
ensureDir "$out/nix-support"
cp $setupHook $out/nix-support/setup-hook
}
postInstall=postInstall
genericBuild
@@ -1,12 +1,12 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "perl-5.8.5";
name = "perl-5.8.6";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.cs.uu.nl/mirror/CPAN/src/5.0/perl-5.8.5.tar.gz;
md5 = "49baa8d7d29b4a9713c06edeb81e6b1b";
url = ftp://ftp.cpan.org/pub/CPAN/src/5.0/perl-5.8.6.tar.bz2;
md5 = "3d030b6ff2a433840edb1a407d18dc0a";
};
# This patch does the following:
@@ -16,4 +16,6 @@ stdenv.mkDerivation {
# 2) Force the use of <errno.h>, not /usr/include/errno.h, on Linux
# systems. (This actually appears to be due to a bug in Perl.)
patches = [./no-sys-dirs.patch];
setupHook = ./setup-hook.sh;
}
@@ -1,6 +1,6 @@
diff -rc perl-orig/Configure perl-5.8.5/Configure
*** perl-orig/Configure 2004-05-12 13:00:41.000000000 +0200
--- perl-5.8.5/Configure 2004-10-04 12:38:29.000000000 +0200
diff -rc perl-orig/Configure perl-5.8.6/Configure
*** perl-orig/Configure 2004-09-10 08:25:52.000000000 +0200
--- perl-5.8.6/Configure 2005-03-10 12:53:28.000000000 +0100
***************
*** 86,100 ****
fi
@@ -11,7 +11,7 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
! paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
! paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
! paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
! paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
! paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
! paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
! paths="$paths /sbin /usr/sbin /usr/libexec"
! paths="$paths /system/gnu_library/bin"
@@ -97,7 +97,7 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
case "$xxx" in
--- 2252,2257 ----
***************
*** 7908,7920 ****
*** 7910,7922 ****
echo " "
case "$sysman" in
'')
@@ -111,7 +111,7 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
;;
esac
if $test -d "$sysman"; then
--- 7892,7899 ----
--- 7894,7901 ----
echo " "
case "$sysman" in
'')
@@ -121,7 +121,7 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
esac
if $test -d "$sysman"; then
***************
*** 17947,17955 ****
*** 17949,17957 ****
case "$full_ar" in
'') full_ar=$ar ;;
esac
@@ -131,7 +131,7 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
: see what type gids are declared as in the kernel
echo " "
--- 17926,17935 ----
--- 17928,17937 ----
case "$full_ar" in
'') full_ar=$ar ;;
esac
@@ -142,9 +142,9 @@ diff -rc perl-orig/Configure perl-5.8.5/Configure
: see what type gids are declared as in the kernel
echo " "
diff -rc perl-orig/ext/Errno/Errno_pm.PL perl-5.8.5/ext/Errno/Errno_pm.PL
*** perl-orig/ext/Errno/Errno_pm.PL 2004-03-31 00:01:25.000000000 +0200
--- perl-5.8.5/ext/Errno/Errno_pm.PL 2004-10-04 10:53:59.000000000 +0200
diff -rc perl-orig/ext/Errno/Errno_pm.PL perl-5.8.6/ext/Errno/Errno_pm.PL
*** perl-orig/ext/Errno/Errno_pm.PL 2004-11-01 15:31:59.000000000 +0100
--- perl-5.8.6/ext/Errno/Errno_pm.PL 2005-03-10 12:52:31.000000000 +0100
***************
*** 105,111 ****
# Watch out for cross compiling for EPOC (usually done on linux)
@@ -162,9 +162,9 @@ diff -rc perl-orig/ext/Errno/Errno_pm.PL perl-5.8.5/ext/Errno/Errno_pm.PL
) {
# Some Linuxes have weird errno.hs which generate
# no #file or #line directives
diff -rc perl-orig/lib/Cwd.pm perl-5.8.5/lib/Cwd.pm
*** perl-orig/lib/Cwd.pm 2004-07-15 18:49:22.000000000 +0200
--- perl-5.8.5/lib/Cwd.pm 2004-10-04 10:53:59.000000000 +0200
diff -rc perl-orig/lib/Cwd.pm perl-5.8.6/lib/Cwd.pm
*** perl-orig/lib/Cwd.pm 2004-11-01 16:42:41.000000000 +0100
--- perl-5.8.6/lib/Cwd.pm 2005-03-10 12:52:31.000000000 +0100
***************
*** 292,298 ****
@@ -0,0 +1,7 @@
addPerlLibPath () {
if test -d $1/lib/site_perl; then
export PERL5LIB="${PERL5LIB}${PERL5LIB:+:}$1/lib/site_perl"
fi
}
envHooks=(${envHooks[@]} addPerlLibPath)
@@ -4,6 +4,5 @@
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl gtk glib libgnomeui scrollkeeper libjpeg];
PERL5LIB = perlXMLParser ~ "/lib/site_perl"; # !!!
buildInputs = [pkgconfig perl perlXMLParser gtk glib libgnomeui scrollkeeper libjpeg];
}
@@ -8,6 +8,4 @@ stdenv.mkDerivation {
# TODO: maybe this package as dependency on gnome-themes?
configureFlags = "--disable-hicolor-check";
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -5,7 +5,4 @@ assert pkgconfig != null && perl != null;
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl perlXMLParser];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -6,9 +6,8 @@
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [
pkgconfig perl gtk glib ORBit2 libgnome libgnomeui
pkgconfig perl perlXMLParser gtk glib ORBit2 libgnome libgnomeui
gnomedesktop libglade libwnck libjpeg libpng scrollkeeper
libXmu
];
PERL5LIB = perlXMLParser ~ "/lib/site_perl"; # !!!
}
@@ -11,6 +11,5 @@ stdenv.mkDerivation {
pkgconfig perl glib libxml2 gconf libbonobo
gnomemimedata popt bzip2 perlXMLParser
];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
patches = [./no-kerberos.patch];
}
@@ -3,26 +3,14 @@
# TODO build complains about missing libsoup and soup. Optional dependency?
assert
null != pkgconfig
&& null != perl
&& null != perlXMLParser
&& null != pkgconfig
&& null != atk
&& null != gail
&& null != gtk
;
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [
perl perlXMLParser pkgconfig libjpeg
atk gail gtk
libglade libgnomeprint libgnomeprintui libgnomeui
gnomeicontheme
];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
perl perlXMLParser pkgconfig libjpeg
atk gail gtk
libglade libgnomeprint libgnomeprintui libgnomeui
gnomeicontheme
];
}
@@ -10,5 +10,4 @@ stdenv.mkDerivation {
libbonobo gconf libgnomeprintui libgnomecanvas
];
propagatedBuildInputs = [gtk libxml2 libgnomeprint];
PERL5LIB = perlXMLParser ~ "/lib/site_perl"; # !!!
}
@@ -3,5 +3,4 @@
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl perlXMLParser];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -6,7 +6,6 @@ assert pkgconfig != null && perl != null && ORBit2 != null
# todo 2.8.1 doesn;t work
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl libxml2 yacc flex];
buildInputs = [pkgconfig perl perlXMLParser libxml2 yacc flex];
propagatedBuildInputs = [ORBit2 popt];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -4,13 +4,11 @@
assert pkgconfig != null && perl != null && libxml2 != null
&& libglade != null && libgnome != null && libgnomecanvas != null;
# todo 2.8.1 doesn;t work
# TODO 2.8.1 doesn't work
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl libglade gettext];
buildInputs = [pkgconfig perl perlXMLParser libglade gettext];
propagatedBuildInputs = [libxml2 libgnome libgnomecanvas];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
LDFLAGS="-lglib-2.0";
LDFLAGS="-lglib-2.0"; # !!! why?
}
@@ -14,6 +14,4 @@ stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig perl perlXMLParser popt zlib];
propagatedBuildInputs = [glib gnomevfs libbonobo gconf];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -4,11 +4,9 @@ stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [
perl perlXMLParser pkgconfig popt libxml2
glib pango
];
perl perlXMLParser pkgconfig popt libxml2
glib pango
];
propagatedBuildInputs = [libxml2 libart];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
}
@@ -4,9 +4,7 @@ stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [
perl perlXMLParser pkgconfig
gtk libgnomeprint libgnomecanvas gnomeicontheme
];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
perl perlXMLParser pkgconfig
gtk libgnomeprint libgnomecanvas gnomeicontheme
];
}
@@ -10,9 +10,7 @@ stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [
perl perlXMLParser pkgconfig gtk libxml2 gail
];
PERL5LIB = perlXMLParser ~ "/lib/site_perl";
perl perlXMLParser pkgconfig gtk libxml2 gail
];
}
@@ -3,5 +3,4 @@
stdenv.mkDerivation {
inherit (input) name src;
buildInputs = [pkgconfig gtk];
# PERL5LIB = perlXMLParser ~ "/lib/site_perl"; # !!!
}
@@ -5,8 +5,7 @@
stdenv.mkDerivation {
inherit (input) name src;
patches = [./xmlcatalog.patch];
buildInputs = [pkgconfig perl libxml2 libxslt];
PERL5LIB = perlXMLParser ~ "/lib/site_perl"; # !!!
buildInputs = [pkgconfig perl perlXMLParser libxml2 libxslt];
inherit docbook_xml_dtd_42;
builder = ./builder.sh;
}
@@ -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;
}
@@ -0,0 +1,7 @@
oldPreConfigure=$preConfigure
preConfigure=myPreConfigure
myPreConfigure() {
echo "LIB = $db4/lib" > config.in
echo "INCLUDE = $db4/include" >> config.in
$oldPreConfigure
}
@@ -1,10 +0,0 @@
buildinputs="$perl $expat"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd XML-Parser-* || exit 1
perl Makefile.PL EXPATLIBPATH=$expat/lib EXPATINCPATH=$expat/include \
SITEPREFIX=$out PERLPREFIX=$out || exit 1
make || exit 1
make install || exit 1
@@ -1,14 +1,11 @@
{stdenv, fetchurl, perl, expat}:
{fetchurl, perl, expat}:
assert perl != null && expat != null;
stdenv.mkDerivation {
name = "perl-XML-Parser-2.34";
builder = ./builder.sh;
import ../generic perl {
name = "XML-Parser-2.34";
src = fetchurl {
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/XML-Parser-2.34.tar.gz;
md5 = "84d9e0001fe01c14867256c3fe115899";
};
perl = perl;
expat = expat;
perlPreHook = ./hook.sh;
inherit expat;
}
@@ -0,0 +1 @@
makeMakerFlags="EXPATLIBPATH=$expat/lib EXPATINCPATH=$expat/include"
@@ -1,19 +1,7 @@
addInputsHook=addInputsHook
addInputsHook() {
# Should be in a Perl setup hook.
envHooks=(${envHooks[@]} addPerlLibs)
}
addPerlLibs() {
PERL5LIB="$PERL5LIB${PERL5LIB:+:}$1/lib/site_perl"
}
. $stdenv/setup
PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/site_perl"
export PERL5LIB
oldIFS=$IFS
IFS=:
perlFlags=
@@ -21,7 +9,7 @@ for i in $PERL5LIB; do
perlFlags="$perlFlags -I$i"
done
IFS=$oldIFS
echo "$perlFlags"
echo "Perl flags: $perlFlags"
preConfigure=preConfigure
preConfigure() {
@@ -42,4 +30,12 @@ preConfigure() {
perl Makefile.PL PREFIX=$out $makeMakerFlags
}
if test -n "$perlPreHook"; then
. $perlPreHook
fi
genericBuild
if test -n "$perlPostHook"; then
. $perlPostHook
fi
@@ -3,6 +3,7 @@ perl:
attrs:
perl.stdenv.mkDerivation (attrs // {
name = "perl-" + attrs.name;
builder = ./builder.sh;
buildInputs = [(if attrs ? buildInputs then attrs.buildInputs else []) perl];
})
+4 -4
View File
@@ -743,12 +743,12 @@ rec {
inherit fetchurl stdenv libtool;
};
perlBerkeleyDB = (import ../development/perl-modules/BerkeleyDB) {
inherit fetchurl stdenv perl db4;
perlBerkeleyDB = import ../development/perl-modules/BerkeleyDB {
inherit fetchurl perl db4;
};
perlXMLParser = (import ../development/perl-modules/XML-Parser) {
inherit fetchurl stdenv perl expat;
perlXMLParser = import ../development/perl-modules/XML-Parser {
inherit fetchurl perl expat;
};
perlXMLLibXML = import ../development/perl-modules/generic perl {