220618ef9c
https://www.perl.com/article/saying-goodbye-to-search-cpan-org/ maybe one operation less ..with unifying recursiveUpdate and first // although not tested fix whitespace
38 lines
867 B
Nix
38 lines
867 B
Nix
perl:
|
|
|
|
{ nativeBuildInputs ? [], name, ... } @ attrs:
|
|
|
|
perl.stdenv.mkDerivation (
|
|
(
|
|
perl.stdenv.lib.recursiveUpdate
|
|
{
|
|
outputs = [ "out" "devdoc" ];
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
# Prevent CPAN downloads.
|
|
PERL_AUTOINSTALL = "--skipdeps";
|
|
|
|
# Avoid creating perllocal.pod, which contains a timestamp
|
|
installTargets = "pure_install";
|
|
|
|
# From http://wiki.cpantesters.org/wiki/CPANAuthorNotes: "allows
|
|
# authors to skip certain tests (or include certain tests) when
|
|
# the results are not being monitored by a human being."
|
|
AUTOMATED_TESTING = true;
|
|
|
|
meta.homepage = "https://metacpan.org/release/${(builtins.parseDrvName name).name}";
|
|
}
|
|
attrs
|
|
)
|
|
//
|
|
{
|
|
name = "perl-" + name;
|
|
builder = ./builder.sh;
|
|
nativeBuildInputs = nativeBuildInputs ++ [ (perl.dev or perl) ];
|
|
inherit perl;
|
|
}
|
|
)
|