summary refs log tree commit diff
path: root/pkgs/development/perl-modules/generic/default.nix
blob: 561bbcdb73ecb6fd3c96170310e2bce0f42cde42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;
  }
)