Skip to content

Commit

Permalink
perlPackages: add default meta.mainProgram (NixOS#176398)
Browse files Browse the repository at this point in the history
Because perl packages are prefixed with the perl version, it means that
the `lib.getExe` heuristic will never point to the binary name. So we
provide the meta.mainProgram that overrides that, using the original
pname or parsed name. It's not perfect but should yield better results
already.
  • Loading branch information
zimbatm committed Jun 6, 2022
1 parent d8fad83 commit ff7b216
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/development/perl-modules/generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is depre
(let
defaultMeta = {
homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name`
mainProgram = attrs.pname or (builtins.parseDrvName attrs.name).name;
platforms = perl.meta.platforms;
};

Expand Down

0 comments on commit ff7b216

Please sign in to comment.