perl: PURL implementation (#569191)

This commit is contained in:
Stig
2026-10-20 21:29:23 +00:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -368,7 +368,7 @@
- All databases of the MySQL family – `mysql`, `mariadb` and `percona` – now provide a client-only package `client` sub-attribute. Use the `<dbname>.client` package if the server components are not needed. The main package continues to ship the client binaries as well.
- Package-URL (PURL, https://github.com/package-url/purl-spec) metadata identifier has been added for `fetchgit`, `fetchpypi` and `fetchFromGithub` fetchers.
- Package-URL (PURL, https://github.com/package-url/purl-spec) metadata identifier has been added for `fetchgit`, `fetchpypi`, `fetchFromGithub` fetchers and to `buildPerlPackage`.
`mkDerivation` has been adjusted to reuse this information.
Package-URLs allow reliably identifying and locating software packages.
Maintainers of derivations using the adapted fetchers should rely on the `drv.src.meta.identifiers.v1.purl` default identifier and can enhance their `drv.meta.identifiers.v1.purls` list once they would like to have additional identifiers.

View File

@@ -47,6 +47,10 @@ lib.throwIf (attrs ? name)
defaultMeta = {
homepage = "https://metacpan.org/dist/${attrs.pname}";
inherit (perl.meta) platforms;
identifiers.purlParts = {
type = "cpan";
spec = "${attrs.pname}@${attrs.version}";
};
};
package = stdenv.mkDerivation (