about summary refs log tree commit diff
path: root/pkgs/tools/security/cyclonedx-gomod/default.nix
blob: 2a27f7b6a35b9d96f3ae397302b0e07d91053a1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  buildGoModule,
  fetchFromGitHub,
}:

buildGoModule rec {
  pname = "cyclonedx-gomod";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "CycloneDX";
    repo = "cyclonedx-gomod";
    rev = "refs/tags/v${version}";
    hash = "sha256-RM8ZH1mO+72ptoU7YKXlCZAyDhYZ7MFXyDYrqBQwsDI=";
  };

  vendorHash = "sha256-1ibMneSOYs5C6Ul8m/rVXVFBJHZrH1D5eWRwVVJ6a+A=";

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

  # Tests require network access and cyclonedx executable
  doCheck = false;

  meta = with lib; {
    description = "Tool to create CycloneDX Software Bill of Materials (SBOM) from Go modules";
    homepage = "https://github.com/CycloneDX/cyclonedx-gomod";
    changelog = "https://github.com/CycloneDX/cyclonedx-gomod/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
    mainProgram = "cyclonedx-gomod";
  };
}