* Sync with the trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=14057
This commit is contained in:
20
pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
Normal file
20
pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{fetchurl, buildPerlPackage, zlib}:
|
||||
|
||||
buildPerlPackage rec {
|
||||
name = "Compress-Raw-Zlib-2.015";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
||||
sha256 = "0g6kz73jxqjfln2pi500y7rr96mhad16hrp5wy6542fapamv4xcd";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
cat > config.in <<EOF
|
||||
BUILD_ZLIB = False
|
||||
INCLUDE = ${zlib}/include
|
||||
LIB = ${zlib}/lib
|
||||
OLD_ZLIB = False
|
||||
GZIP_OS_CODE = AUTO_DETECT
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
@@ -2,14 +2,10 @@ source $stdenv/setup
|
||||
|
||||
PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/site_perl"
|
||||
|
||||
oldIFS=$IFS
|
||||
IFS=:
|
||||
perlFlags=
|
||||
for i in $PERL5LIB; do
|
||||
for i in $(IFS=:; echo $PERL5LIB); do
|
||||
perlFlags="$perlFlags -I$i"
|
||||
done
|
||||
IFS=$oldIFS
|
||||
echo "Perl flags: $perlFlags"
|
||||
|
||||
oldPreConfigure="$preConfigure"
|
||||
preConfigure=preConfigure
|
||||
@@ -42,6 +38,15 @@ postFixup() {
|
||||
if test -e $out/nix-support/propagated-build-inputs; then
|
||||
ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
|
||||
fi
|
||||
|
||||
# Some (broken?) packages install in $out/lib/${perlVersion}
|
||||
# instead of $out/lib/site_perl/${perlVersion}. Try to fix that
|
||||
# automatically.
|
||||
if ! test -e $out/lib/site_perl; then
|
||||
echo "fixing wrong Perl installation path..."
|
||||
ensureDir $out/lib/site_perl
|
||||
mv $out/lib/5.* $out/lib/site_perl
|
||||
fi
|
||||
}
|
||||
|
||||
if test -n "$perlPreHook"; then
|
||||
|
||||
@@ -2,8 +2,17 @@ perl:
|
||||
|
||||
attrs:
|
||||
|
||||
perl.stdenv.mkDerivation (attrs // {
|
||||
name = "perl-" + attrs.name;
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [(if attrs ? buildInputs then attrs.buildInputs else []) perl];
|
||||
})
|
||||
perl.stdenv.mkDerivation (
|
||||
{
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
}
|
||||
//
|
||||
attrs
|
||||
//
|
||||
{
|
||||
name = "perl-" + attrs.name;
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [(if attrs ? buildInputs then attrs.buildInputs else []) perl];
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user