1{ lib, buildGoModule, fetchFromGitHub, testers, notation }:
2
3buildGoModule rec {
4 pname = "notation";
5 version = "1.0.1";
6
7 src = fetchFromGitHub {
8 owner = "notaryproject";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-KcB5l6TRZhciXO04mz5iORR4//cAhrh+o4Kdq7LA4A4=";
12 };
13
14 vendorHash = "sha256-r58ZV63KIHKxh5HDeQRfd0OF0s7xpC4sXvsYLhm8AIE=";
15
16 # This is a Go sub-module and cannot be built directly (e2e tests).
17 excludedPackages = [ "./test" ];
18
19 ldflags = [
20 "-s"
21 "-w"
22 "-X github.com/notaryproject/notation/internal/version.Version=${version}"
23 "-X github.com/notaryproject/notation/internal/version.BuildMetadata="
24 ];
25
26 passthru.tests.version = testers.testVersion {
27 package = notation;
28 command = "notation version";
29 };
30
31 meta = with lib; {
32 description = "CLI tool to sign and verify OCI artifacts and container images";
33 homepage = "https://notaryproject.dev/";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ aaronjheng ];
36 };
37}