nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildDotnetModule,
4 fetchFromGitHub,
5 dotnetCorePackages,
6}:
7
8buildDotnetModule rec {
9 pname = "cyclonedx-cli";
10 version = "0.27.2";
11
12 src = fetchFromGitHub {
13 owner = "CycloneDX";
14 repo = "cyclonedx-cli";
15 tag = "v${version}";
16 hash = "sha256-QU/MaT8iIf/9VpOb2mixOfOtG/J+sE7S0mT6BKYQnlI=";
17 };
18
19 dotnet-sdk = dotnetCorePackages.sdk_8_0;
20 nugetDeps = ./deps.json;
21
22 preFixup = ''
23 cd $out/bin
24 find . ! -name 'cyclonedx' -type f -exec rm -f {} +
25 '';
26
27 postPatch = ''
28 substituteInPlace src/cyclonedx/cyclonedx.csproj tests/cyclonedx.tests/cyclonedx.tests.csproj \
29 --replace-fail 'net6.0' 'net8.0'
30 '';
31
32 meta = {
33 description = "CycloneDX CLI tool for SBOM analysis, merging, diffs and format conversions";
34 homepage = "https://github.com/CycloneDX/cyclonedx-cli";
35 changelog = "https://github.com/CycloneDX/cyclonedx-cli/releases/tag/v${version}";
36 maintainers = with lib.maintainers; [ thillux ];
37 teams = [ lib.teams.cyberus ];
38 license = lib.licenses.asl20;
39 platforms = with lib.platforms; (linux ++ darwin);
40 mainProgram = "cyclonedx";
41 };
42}