mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib.meta.getLicenseBySpdxId: set spdxId in default value
Nixpkgs does not contain an entry in lib.licenses for every SPDX license, so it is expected that a valid SPDX id would yield no proper result from getLicenseFromSpdxId. Hence, we should set spdxId in the default value. Users that think their SPDX ID may be invalid should rather use getLicenseFromSpdxIdOr.
This commit is contained in:
@@ -434,8 +434,9 @@ rec {
|
||||
getLicenseFromSpdxId =
|
||||
licstr:
|
||||
getLicenseFromSpdxIdOr licstr (
|
||||
lib.warn "getLicenseFromSpdxId: No license matches the given SPDX ID: ${licstr}" {
|
||||
lib.warn "getLicenseFromSpdxId: No license with the given SPDX ID found: ${licstr}" {
|
||||
shortName = licstr;
|
||||
spdxId = licstr;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user