From e4839ebb6060dbd87f01e29a6cfae2aa05995b4a Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 22 Feb 2025 21:10:58 +0900 Subject: [PATCH] jsonschema: 5.3.1 -> 0.7.0 with fixed update script They have different tags for CLI(jv) and jsonschema. See https://github.com/santhosh-tekuri/jsonschema/blob/83a4c8009c0e7855accffc926454a37a51d895ad/README.md?plain=1#L63 for detail. And jv 0.7.0 is higher version than jsonschema 6.0.1. --- pkgs/by-name/js/jsonschema/package.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/js/jsonschema/package.nix b/pkgs/by-name/js/jsonschema/package.nix index 477490f76584..5d0da9c097ac 100644 --- a/pkgs/by-name/js/jsonschema/package.nix +++ b/pkgs/by-name/js/jsonschema/package.nix @@ -7,19 +7,22 @@ buildGoModule rec { pname = "jsonschema"; - version = "5.3.1"; + version = "0.7.0"; src = fetchFromGitHub { owner = "santhosh-tekuri"; repo = "jsonschema"; - tag = "v${version}"; - hash = "sha256-ANo9OkdNVCjV5uEqr9lNNbStquNb/3oxuTfMqE2nUzo="; + tag = "cmd/jv/v${version}"; + hash = "sha256-bMDDji5daBmjSeGxeS4PZfmTg+b8OVHsP8+m3jtpQJc="; }; sourceRoot = "${src.name}/cmd/jv"; - passthru.updateScript = nix-update-script { }; + env.GOWORK = "off"; + passthru.updateScript = nix-update-script { + extraArgs = [ "--version-regex=cmd/jv/v([\\d\\.]+)" ]; + }; - vendorHash = "sha256-FuUkC7iwn/jO3fHjT9nGUXc2X1QuuxPc8DAzVpzhANk="; + vendorHash = "sha256-s7kEdA4yuExuzwN3hHgeZmtkES3Zw1SALoEHSNtdAww="; ldflags = [ "-s" @@ -29,7 +32,7 @@ buildGoModule rec { meta = { description = "JSON schema compilation and validation"; homepage = "https://github.com/santhosh-tekuri/jsonschema"; - changelog = "https://github.com/santhosh-tekuri/jsonschema/releases/tag/v${version}"; + changelog = "https://github.com/santhosh-tekuri/jsonschema/releases/tag/${src.tag}"; license = lib.licenses.asl20; mainProgram = "jv"; maintainers = with lib.maintainers; [ ibizaman ];