2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, testers
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
let self = buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "go-jsonnet";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "0.18.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
2022-10-06 18:32:54 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-o/IjXskGaMhvQmTsAS745anGBMI2bwHf/EOEp57H8LU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
|
|
|
|
url = "https://github.com/google/go-jsonnet/commit/7032dd729f7e684dcfb2574f4fe99499165ef9cb.patch";
|
|
|
|
hash = "sha256-emUcuE9Q4qkXFXLyLvLHjzrKAaQhjcSWLNafABvHxhM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorHash = "sha256-H4vLVXpuPkECB15LHoS9N9IwUD7Fzccshwbo5hjeXXc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
subPackages = [ "cmd/jsonnet*" ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-03-10 19:12:11 +00:00
|
|
|
package = self;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An implementation of Jsonnet in pure Go";
|
|
|
|
homepage = "https://github.com/google/go-jsonnet";
|
|
|
|
license = licenses.asl20;
|
2022-03-10 19:12:11 +00:00
|
|
|
maintainers = with maintainers; [ nshalman aaronjheng ];
|
|
|
|
mainProgram = "jsonnet";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
in self
|