mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05: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:
parent
661b0d8ec7
commit
666476ff53
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue