Unverified Commit ccbc005e authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

go-jsonnet: use finalAttrs (#411423)

parents 9b4d4249 03c91598
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -3,17 +3,16 @@
  buildGoModule,
  fetchFromGitHub,
  testers,
  go-jsonnet,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "go-jsonnet";
  version = "0.21.0";

  src = fetchFromGitHub {
    owner = "google";
    repo = pname;
    rev = "v${version}";
    repo = finalAttrs.pname;
    tag = "v${finalAttrs.version}";
    hash = "sha256-J92xNDpCidbiSsN6NveS6BX6Tx+qDQqkgm6pjk1wBTQ=";
  };

@@ -21,9 +20,14 @@ buildGoModule rec {

  subPackages = [ "cmd/jsonnet*" ];

  ldflags = [
    "-s"
    "-w"
  ];

  passthru.tests.version = testers.testVersion {
    package = go-jsonnet;
    version = "v${version}";
    package = finalAttrs.finalPackage;
    version = "v${finalAttrs.version}";
  };

  meta = {
@@ -36,4 +40,4 @@ buildGoModule rec {
    ];
    mainProgram = "jsonnet";
  };
}
})