Unverified Commit d9d0c98d authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

notation: use finalAttrs (#413519)

parents bee5d9eb 81018611
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -4,17 +4,16 @@
  fetchFromGitHub,
  installShellFiles,
  testers,
  notation,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "notation";
  version = "1.3.2";

  src = fetchFromGitHub {
    owner = "notaryproject";
    repo = "notation";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-l9A5AwKJ/atN92Oral6PRH2nCbMJ+/ST9weXYRZXWms=";
  };

@@ -30,7 +29,7 @@ buildGoModule rec {
  ldflags = [
    "-s"
    "-w"
    "-X github.com/notaryproject/notation/internal/version.Version=${version}"
    "-X github.com/notaryproject/notation/internal/version.Version=${finalAttrs.version}"
    "-X github.com/notaryproject/notation/internal/version.BuildMetadata="
  ];

@@ -42,7 +41,7 @@ buildGoModule rec {
  '';

  passthru.tests.version = testers.testVersion {
    package = notation;
    package = finalAttrs.finalPackage;
    command = "notation version";
  };

@@ -53,4 +52,4 @@ buildGoModule rec {
    maintainers = with lib.maintainers; [ aaronjheng ];
    mainProgram = "notation";
  };
}
})