diff options
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r-- | pkgs/development/perl-modules/generic/default.nix | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 9ff63c14e5188..2d1c550d3168c 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -27,26 +27,16 @@ , ... }@attrs: -assert attrs?pname -> attrs?version; -assert attrs?pname -> !(attrs?name); - -lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is deprecated, use `pname' and `version' instead" +lib.throwIf (attrs ? name) "buildPerlPackage: `name` (\"${attrs.name}\") is deprecated, use `pname` and `version` instead" (let defaultMeta = { - homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name` - platforms = perl.meta.platforms; + homepage = "https://metacpan.org/dist/${attrs.pname}"; + inherit (perl.meta) platforms; }; - cleanedAttrs = builtins.removeAttrs attrs [ - "meta" "builder" "version" "pname" "fullperl" - "buildInputs" "nativeBuildInputs" "buildInputs" - "PERL_AUTOINSTALL" "AUTOMATED_TESTING" "PERL_USE_UNSAFE_INC" - ]; - - package = stdenv.mkDerivation ({ - pname = "perl${perl.version}-${lib.getName attrs}"; # TODO: phase-out `attrs.name` - version = lib.getVersion attrs; # TODO: phase-out `attrs.name` + package = stdenv.mkDerivation (attrs // { + name = "perl${perl.version}-${attrs.pname}-${attrs.version}"; builder = ./builder.sh; @@ -59,6 +49,6 @@ lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is depre inherit PERL_AUTOINSTALL AUTOMATED_TESTING PERL_USE_UNSAFE_INC; meta = defaultMeta // (attrs.meta or { }); - } // cleanedAttrs); + }); in toPerlModule package) |