mirror of
https://github.com/nix-community/nix-init.git
synced 2024-09-11 08:05:42 +03:00
license: clean up get_nix_license
This commit is contained in:
parent
863d98a20e
commit
af8f9a51d9
@ -83,7 +83,7 @@
|
||||
''rustfmt\.toml''
|
||||
];
|
||||
|
||||
get-nix-license = callPackage ./src/get-nix-license.nix { };
|
||||
get-nix-license = callPackage ./src/get_nix_license.nix { };
|
||||
|
||||
license-store-cache = buildPackage {
|
||||
pname = "license-store-cache";
|
||||
@ -138,7 +138,7 @@
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p data
|
||||
ln -s ${get-nix-license} data/get-nix-license.rs
|
||||
ln -s ${get-nix-license} data/get_nix_license.rs
|
||||
ln -s ${license-store-cache} data/license-store-cache.zstd
|
||||
'';
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
|
||||
shellHook = ''
|
||||
mkdir -p data
|
||||
ln -sf ${get-nix-license} data/get-nix-license.rs
|
||||
ln -sf ${get-nix-license} data/get_nix_license.rs
|
||||
ln -sf ${license-store-cache} data/license-store-cache.zstd
|
||||
'';
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ let
|
||||
(attrNames deprecatedAliases);
|
||||
|
||||
"invalid aliases" = attrNames (filterAttrs
|
||||
(k: v: licenses.${v}.deprecated or true)
|
||||
(_: v: licenses.${v}.deprecated or true)
|
||||
deprecatedAliases);
|
||||
};
|
||||
|
@ -9,7 +9,7 @@ pub static LICENSE_STORE: Lazy<Option<Store>> = Lazy::new(|| {
|
||||
Store::from_cache(include_bytes!("../data/license-store-cache.zstd") as &[_]).ok_warn()
|
||||
});
|
||||
|
||||
include!("../data/get-nix-license.rs");
|
||||
include!("../data/get_nix_license.rs");
|
||||
|
||||
pub fn parse_spdx_expression(license: &str, source: &'static str) -> Vec<&'static str> {
|
||||
Expression::parse_mode(license, ParseMode::LAX)
|
||||
|
Loading…
Reference in New Issue
Block a user