diff options
author | Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> | 2021-10-11 07:08:40 +0800 |
---|---|---|
committer | Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> | 2021-12-02 18:33:48 +0800 |
commit | 60950f739e0fd046e94c5ef86c146b311d39a2a5 (patch) | |
tree | 663908ad601fd8f21f3c73ca5ef95478436af9e7 /lib/default.nix | |
parent | 53edfe1d1c51c38e2adc4d8eb37a7a2657e3fe01 (diff) | |
download | nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar.gz nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar.bz2 nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar.lz nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar.xz nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.tar.zst nixpkgs-60950f739e0fd046e94c5ef86c146b311d39a2a5.zip |
lib/meta: add getLicenseFromSpdxId function
Move function spdxLicense, internally used in yarn2nix to lib/meta.nix, and rename to getLicenseFromSpdxId A similar function is implemented in poetry2nix, but the one originally in yarn2nix seems beter. since it falls back to an license-like attrset for mismatched case instead of a plain string
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix index 68d73220fa9..626a751cb10 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -105,7 +105,7 @@ let makeScope makeScopeWithSplicing; inherit (self.meta) addMetaAttrs dontDistribute setName updateName appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio - hiPrioSet; + hiPrioSet getLicenseFromSpdxId; inherit (self.sources) pathType pathIsDirectory cleanSourceFilter cleanSource sourceByRegex sourceFilesBySuffices commitIdFromGitRepo cleanSourceWith pathHasContext |