nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, rustPlatform
4, fetchFromGitHub
5, pkg-config
6, openssl
7, Security
8, SystemConfiguration
9, CoreFoundation
10, curl
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "cargo-cyclonedx";
15 version = "0.3.7";
16
17 src = fetchFromGitHub {
18 owner = "CycloneDX";
19 repo = "cyclonedx-rust-cargo";
20 rev = "${pname}-${version}";
21 hash = "sha256-xr3YNjQp+XhIWIqJ1rPUyM9mbtWGExlFEj28/SB8vfE=";
22 };
23
24 cargoHash = "sha256-NsBY+wb4IAlKOMh5BMvT734z//Wp/s0zimm04v8pqyc=";
25
26 nativeBuildInputs = [
27 pkg-config
28 ];
29
30 buildInputs = [
31 openssl
32 ] ++ lib.optionals stdenv.isDarwin [
33 Security
34 SystemConfiguration
35 CoreFoundation
36 curl
37 ];
38
39 meta = with lib; {
40 description = "Creates CycloneDX Software Bill of Materials (SBOM) from Rust (Cargo) projects";
41 longDescription = ''
42 The CycloneDX module for Rust (Cargo) creates a valid CycloneDX Software
43 Bill-of-Material (SBOM) containing an aggregate of all project
44 dependencies. CycloneDX is a lightweight SBOM specification that is
45 easily created, human and machine readable, and simple to parse.
46 '';
47 homepage = "https://github.com/CycloneDX/cyclonedx-rust-cargo";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ nikstur ];
50 };
51}