depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-cyclonedx/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

52 lines
1.3 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, Security
, SystemConfiguration
, CoreFoundation
, curl
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-cyclonedx";
version = "0.5.4";
src = fetchFromGitHub {
owner = "CycloneDX";
repo = "cyclonedx-rust-cargo";
rev = "${pname}-${version}";
hash = "sha256-H/CFEz1+rFHiTEP8JBFH9W9OTHjRdIBOov9c0JO69xE=";
};
cargoHash = "sha256-OhkC8R/+mdjFI6WRisFYZk5PKxje3W9X5p9tGCgKQOw=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
CoreFoundation
curl
];
meta = with lib; {
description = "Creates CycloneDX Software Bill of Materials (SBOM) from Rust (Cargo) projects";
mainProgram = "cargo-cyclonedx";
longDescription = ''
The CycloneDX module for Rust (Cargo) creates a valid CycloneDX Software
Bill-of-Material (SBOM) containing an aggregate of all project
dependencies. CycloneDX is a lightweight SBOM specification that is
easily created, human and machine readable, and simple to parse.
'';
homepage = "https://github.com/CycloneDX/cyclonedx-rust-cargo";
license = licenses.asl20;
maintainers = with maintainers; [ nikstur ];
};
}