perlPackages: add default meta.mainProgram (#176398)
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.
This commit is contained in:
parent
d8fad83d2c
commit
ff7b216dcf
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue