From 6e6624f4c54843d40ab97e44e8b5e0fb6cb339ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Mar 2007 13:32:17 +0000 Subject: [PATCH] * Perl generic builder: set nix-support/propagated-user-env-packages to the propagated build inputs as a convenience to people who want to install Perl packages into their user environments. svn path=/nixpkgs/trunk/; revision=8278 --- pkgs/development/perl-modules/generic/builder.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 11fb6df8107..a3ad77bb25c 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -30,12 +30,23 @@ preConfigure() { perl Makefile.PL PREFIX=$out $makeMakerFlags } +postFixup=postFixup +postFixup() { + # If a user installs a Perl package, she probably also wants its + # dependencies in the user environment (since Perl modules don't + # have something like an RPATH, so the only way to find the + # dependencies is to have them in the PERL5LIB variable). + 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 +} + if test -n "$perlPreHook"; then - source $perlPreHook + eval "$perlPreHook" fi genericBuild if test -n "$perlPostHook"; then - source $perlPostHook + eval "$perlPostHook" fi