Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchCrate, 4 rustPlatform, 5 versionCheckHook, 6 nix-update-script, 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "jsonschema-cli"; 11 version = "0.30.0"; 12 13 src = fetchCrate { 14 inherit pname version; 15 hash = "sha256-AjBVvEixkP7khm3/0U81E/G7tCKoqnfNG05gpgYlqNE="; 16 }; 17 18 cargoHash = "sha256-3hZAEjJrJ5vw6kXwY+xTv/mO0lx/KNmXA2lULJkX9aE="; 19 20 nativeInstallCheckInputs = [ 21 versionCheckHook 22 ]; 23 doInstallCheck = true; 24 versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}"; 25 versionCheckProgramArg = "--version"; 26 27 passthru.updateScript = nix-update-script { }; 28 29 meta = { 30 description = "Fast command-line tool for JSON Schema validation"; 31 homepage = "https://github.com/Stranger6667/jsonschema"; 32 changelog = "https://github.com/Stranger6667/jsonschema/releases/tag/rust-v${version}"; 33 license = lib.licenses.mit; 34 maintainers = with lib.maintainers; [ 35 kachick 36 ]; 37 mainProgram = "jsonschema-cli"; 38 }; 39}