1{ lib, buildGoModule, fetchFromGitHub, fetchpatch, testers, go-jsonnet }:
2
3buildGoModule rec {
4 pname = "go-jsonnet";
5 version = "0.19.1";
6
7 src = fetchFromGitHub {
8 owner = "google";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-FgQYnas0qkIedRAA8ApZXLzEylg6PS6+8zzl7j+yOeI=";
12 };
13
14 vendorSha256 = "sha256-j1fTOUpLx34TgzW94A/BctLrg9XoTtb3cBizhVJoEEI=";
15
16 patches = [
17 # See https://github.com/google/go-jsonnet/issues/653.
18 (fetchpatch {
19 url = "https://github.com/google/go-jsonnet/commit/5712f2ed2c8dfa685e4f1234eefc7690a580af6f.patch";
20 hash = "sha256-/+6BlAaul4FoD7pq7yAy1xG78apEBuH2LC4fsfbugFQ=";
21 })
22 ];
23
24 subPackages = [ "cmd/jsonnet*" ];
25
26 passthru.tests.version = testers.testVersion {
27 package = go-jsonnet;
28 version = "v${version}";
29 };
30
31 meta = with lib; {
32 description = "An implementation of Jsonnet in pure Go";
33 homepage = "https://github.com/google/go-jsonnet";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ nshalman aaronjheng ];
36 mainProgram = "jsonnet";
37 };
38}