2ce5db779a
GitOrigin-RevId: 48037fd90426e44e4bf03e6479e88a11453b9b66
71 lines
1.3 KiB
Nix
71 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, importlib-metadata
|
|
, jsonschema
|
|
, lxml
|
|
, packageurl-python
|
|
, poetry-core
|
|
, python
|
|
, pythonOlder
|
|
, requirements-parser
|
|
, setuptools
|
|
, toml
|
|
, types-setuptools
|
|
, types-toml
|
|
, xmldiff
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cyclonedx-python-lib";
|
|
version = "2.4.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "CycloneDX";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-IrMXHWeksEmON3LxJvQ3WSKwQTY0aRZ8XItWMr3p4gw=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
importlib-metadata
|
|
packageurl-python
|
|
requirements-parser
|
|
setuptools
|
|
toml
|
|
types-setuptools
|
|
types-toml
|
|
];
|
|
|
|
checkInputs = [
|
|
jsonschema
|
|
lxml
|
|
xmldiff
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"cyclonedx"
|
|
];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
# Tests require network access
|
|
rm tests/test_output_json.py
|
|
${python.interpreter} -m unittest discover -s tests -v
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python library for generating CycloneDX SBOMs";
|
|
homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|