13 stdenv.mkDerivation (finalAttrs: {
17 src = fetchFromGitHub {
20 rev = "v${finalAttrs.version}";
21 hash = "sha256-5FxH9cAJ9FoSn1euimKOvxlAEny+LUqj/EH80+l1v04=";
27 node-gyp # required for sqlite3 bindings
29 python3 # required for sqlite3 bindings
30 ] ++ lib.optional stdenv.hostPlatform.isDarwin [ xcbuild ];
32 pnpmDeps = pnpm_9.fetchDeps {
33 inherit (finalAttrs) pname version src;
34 hash = "sha256-GdFU8mx9H3daxziprIOQWZWEBcz9y9Qk88sus838Xlk=";
40 pushd node_modules/sqlite3
50 mkdir -p $out/bin $out/lib
52 makeWrapper ${nodejs}/bin/node "$out/bin/cdxgen" --add-flags "$out/lib/bin/cdxgen.js"
53 makeWrapper ${nodejs}/bin/node "$out/bin/cdxgen-evinse" --add-flags "$out/lib/bin/evinse.js"
54 makeWrapper ${nodejs}/bin/node "$out/bin/cdxgen-repl" --add-flags "$out/lib/bin/repl.js"
55 makeWrapper ${nodejs}/bin/node "$out/bin/cdxgen-verify" --add-flags "$out/lib/bin/verify.js"
61 description = "Creates CycloneDX Software Bill-of-Materials (SBOM) for your projects from source and container images";
62 mainProgram = "cdxgen";
63 homepage = "https://github.com/CycloneDX/cdxgen";
64 license = licenses.asl20;
65 maintainers = with maintainers; [