From 26c53e85d7949188e0bd1a5eab3e8aa43b63383a Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Sat, 19 Feb 2022 08:26:03 +0000 Subject: [PATCH] go-jsonnet: add jsonnet-deps and jsonnet-lint --- .../compilers/go-jsonnet/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/go-jsonnet/default.nix b/pkgs/development/compilers/go-jsonnet/default.nix index 2b7c6a2f071..25bedd397b2 100644 --- a/pkgs/development/compilers/go-jsonnet/default.nix +++ b/pkgs/development/compilers/go-jsonnet/default.nix @@ -1,6 +1,6 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, testVersion }: -buildGoModule rec { +let self = buildGoModule rec { pname = "go-jsonnet"; version = "0.18.0"; @@ -15,12 +15,19 @@ buildGoModule rec { doCheck = false; - subPackages = [ "cmd/jsonnet" "cmd/jsonnetfmt" ]; + subPackages = [ "cmd/jsonnet*" ]; + + passthru.tests.version = testVersion { + package = self; + version = "v${version}"; + }; meta = with lib; { description = "An implementation of Jsonnet in pure Go"; homepage = "https://github.com/google/go-jsonnet"; license = licenses.asl20; - maintainers = with maintainers; [ nshalman ]; + maintainers = with maintainers; [ nshalman aaronjheng ]; + mainProgram = "jsonnet"; }; -} +}; +in self