1if [ -e .attrs.sh ]; then source .attrs.sh; fi
2source $stdenv/setup
3
4PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/perl5/site_perl"
5
6perlFlags=
7for i in $(IFS=:; echo $PERL5LIB); do
8 perlFlags="$perlFlags -I$i"
9done
10
11oldPreConfigure="$preConfigure"
12preConfigure() {
13
14 eval "$oldPreConfigure"
15
16 find . | while read fn; do
17 if test -f "$fn"; then
18 first=$(dd if="$fn" count=2 bs=1 2> /dev/null)
19 if test "$first" = "#!"; then
20 echo "patching $fn..."
21 sed -i "$fn" -e "s|^#\!\(.*\bperl\b.*\)$|#\!\1$perlFlags|"
22 fi
23 fi
24 done
25
26 perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags PERL=$(type -P perl) FULLPERL=\"$fullperl/bin/perl\"
27}
28
29if test -n "$perlPreHook"; then
30 eval "$perlPreHook"
31fi
32
33genericBuild
34
35if test -n "$perlPostHook"; then
36 eval "$perlPostHook"
37fi