Unverified Commit 6d2f58d4 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #299753 from thillux/mtheil/cyclonedx-cli

cyclonedx-cli: init at 0.25.0; sbom-utility: init at 0.15.0
parents 3905a63b 135451e9
Loading
Loading
Loading
Loading
+195 −0

File added.

Preview size limit exceeded, changes collapsed.

+33 −0
Original line number Diff line number Diff line
{ lib
, buildDotnetModule
, fetchFromGitHub
}:

buildDotnetModule rec {
  pname = "cyclonedx-cli";
  version = "0.25.0";

  src = fetchFromGitHub {
    owner = "CycloneDX";
    repo = "cyclonedx-cli";
    rev = "refs/tags/v${version}";
    hash = "sha256-kAMSdUMr/NhsbMBViFJQlzgUNnxWgi/CLb3CW9OpWFo=";
  };

  nugetDeps = ./deps.nix;

  preFixup = ''
    cd $out/bin
    find . ! -name 'cyclonedx' -type f -exec rm -f {} +
  '';

  meta = with lib; {
    description = "CycloneDX CLI tool for SBOM analysis, merging, diffs and format conversions";
    homepage = "https://github.com/CycloneDX/cyclonedx-cli";
    changelog = "https://github.com/CycloneDX/cyclonedx-cli/releases/tag/v${version}";
    maintainers = with maintainers; [ thillux ];
    license = licenses.asl20;
    platforms = with platforms; (linux ++ darwin);
    mainProgram = "cyclonedx";
  };
}
+32 −0
Original line number Diff line number Diff line
{
  lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "sbom-utility";
  version = "0.15.0";

  src = fetchFromGitHub {
    owner = "CycloneDX";
    repo = "sbom-utility";
    rev = "refs/tags/v${version}";
    hash = "sha256-tNLMrtJj1eeJ4sVhDRR24/KVI1HzZSRquiImuDTNZFI=";
  };

  vendorHash = "sha256-EdzI5ypwZRksQVmcfGDUgEMa4CeAPcm237ZaKqmWQDY=";

  preCheck = ''
    cd test
  '';

  meta = with lib; {
    description = "Utility that provides an API platform for validating, querying and managing BOM data";
    homepage = "https://github.com/CycloneDX/sbom-utility";
    changelog = "https://github.com/CycloneDX/sbom-utility/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ thillux ];
    mainProgram = "sbom-utility";
  };
}