Perl generic builder: Put man pages in a separate output
This commit is contained in:
parent
977a1df79a
commit
a7b1aa429e
@ -28,6 +28,13 @@ preConfigure() {
|
||||
perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags
|
||||
}
|
||||
|
||||
preFixup() {
|
||||
if [ -n "$man" ]; then
|
||||
mkdir -p $man/share
|
||||
if [ -d $out/man ]; then mv $out/man $man/share/; fi
|
||||
fi
|
||||
}
|
||||
|
||||
postFixup() {
|
||||
# If a user installs a Perl package, she probably also wants its
|
||||
# dependencies in the user environment (since Perl modules don't
|
||||
|
@ -1,13 +1,15 @@
|
||||
perl:
|
||||
|
||||
{ buildInputs ? [], ... } @ attrs:
|
||||
{ buildInputs ? [], name, ... } @ attrs:
|
||||
|
||||
perl.stdenv.mkDerivation (
|
||||
{
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
|
||||
# Prevent CPAN downloads.
|
||||
PERL_AUTOINSTALL = "--skipdeps";
|
||||
|
||||
@ -20,7 +22,7 @@ perl.stdenv.mkDerivation (
|
||||
attrs
|
||||
//
|
||||
{
|
||||
name = "perl-" + attrs.name;
|
||||
name = "perl-" + name;
|
||||
builder = ./builder.sh;
|
||||
buildInputs = buildInputs ++ [ perl ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user