44 lines
1021 B
Nix
44 lines
1021 B
Nix
{
|
|
lib,
|
|
fetchCrate,
|
|
rustPlatform,
|
|
cacert,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "jsonschema-cli";
|
|
version = "0.48.0";
|
|
|
|
src = fetchCrate {
|
|
pname = "jsonschema-cli";
|
|
inherit (finalAttrs) version;
|
|
hash = "sha256-nQblUoTzrheAQA6wlT/p/x72eATD3gUUjgBneMu6L2E=";
|
|
};
|
|
|
|
cargoHash = "sha256-rm5v5S11mJRoyhUnSFXLKu/znKClnI6hOQY7qDpyb/U=";
|
|
|
|
preCheck = ''
|
|
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Fast command-line tool for JSON Schema validation";
|
|
homepage = "https://github.com/Stranger6667/jsonschema";
|
|
changelog = "https://github.com/Stranger6667/jsonschema/releases/tag/rust-v${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
kachick
|
|
];
|
|
mainProgram = "jsonschema-cli";
|
|
};
|
|
})
|