nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nix-update-script,
6}:
7
8buildGoModule rec {
9 pname = "jsonschema";
10 version = "0.7.0";
11
12 src = fetchFromGitHub {
13 owner = "santhosh-tekuri";
14 repo = "jsonschema";
15 tag = "cmd/jv/v${version}";
16 hash = "sha256-bMDDji5daBmjSeGxeS4PZfmTg+b8OVHsP8+m3jtpQJc=";
17 };
18
19 sourceRoot = "${src.name}/cmd/jv";
20 env.GOWORK = "off";
21 passthru.updateScript = nix-update-script {
22 extraArgs = [ "--version-regex=cmd/jv/v([\\d\\.]+)" ];
23 };
24
25 vendorHash = "sha256-s7kEdA4yuExuzwN3hHgeZmtkES3Zw1SALoEHSNtdAww=";
26
27 ldflags = [
28 "-s"
29 "-w"
30 ];
31
32 meta = {
33 description = "JSON schema compilation and validation";
34 homepage = "https://github.com/santhosh-tekuri/jsonschema";
35 changelog = "https://github.com/santhosh-tekuri/jsonschema/releases/tag/${src.tag}";
36 license = lib.licenses.asl20;
37 mainProgram = "jv";
38 maintainers = with lib.maintainers; [ ibizaman ];
39 };
40}