2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-09-22 12:36:57 +00:00
|
|
|
, ddt
|
2021-10-28 06:52:43 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
2022-01-13 20:06:32 +00:00
|
|
|
, jsonschema
|
2023-10-09 19:29:22 +00:00
|
|
|
, license-expression
|
2022-01-13 20:06:32 +00:00
|
|
|
, lxml
|
2021-10-28 06:52:43 +00:00
|
|
|
, packageurl-python
|
2023-04-12 12:48:02 +00:00
|
|
|
, py-serializable
|
|
|
|
, pythonRelaxDepsHook
|
2021-10-28 06:52:43 +00:00
|
|
|
, poetry-core
|
2022-09-22 12:36:57 +00:00
|
|
|
, pytestCheckHook
|
2021-10-28 06:52:43 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requirements-parser
|
2022-06-16 17:23:12 +00:00
|
|
|
, sortedcontainers
|
2021-10-28 06:52:43 +00:00
|
|
|
, setuptools
|
|
|
|
, toml
|
2021-12-06 16:07:01 +00:00
|
|
|
, types-setuptools
|
|
|
|
, types-toml
|
2022-04-27 09:35:20 +00:00
|
|
|
, xmldiff
|
2021-10-28 06:52:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cyclonedx-python-lib";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "4.2.3";
|
2021-10-28 06:52:43 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CycloneDX";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "cyclonedx-python-lib";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-I94YsfDJ+FGQBRWCRKum917tXJ5vFm/cWbbM+NpwA4M=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonRelaxDepsHook
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
importlib-metadata
|
2023-10-09 19:29:22 +00:00
|
|
|
license-expression
|
2021-10-28 06:52:43 +00:00
|
|
|
packageurl-python
|
|
|
|
requirements-parser
|
|
|
|
setuptools
|
2022-06-16 17:23:12 +00:00
|
|
|
sortedcontainers
|
2021-10-28 06:52:43 +00:00
|
|
|
toml
|
2023-04-12 12:48:02 +00:00
|
|
|
py-serializable
|
2021-12-06 16:07:01 +00:00
|
|
|
types-setuptools
|
|
|
|
types-toml
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
ddt
|
2022-01-13 20:06:32 +00:00
|
|
|
jsonschema
|
|
|
|
lxml
|
2022-09-22 12:36:57 +00:00
|
|
|
pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
xmldiff
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cyclonedx"
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"py-serializable"
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH}
|
2022-09-09 14:08:57 +00:00
|
|
|
'';
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/"
|
|
|
|
];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# These tests require network access.
|
|
|
|
"test_bom_v1_3_with_metadata_component"
|
|
|
|
"test_bom_v1_4_with_metadata_component"
|
|
|
|
];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Test failures seem py-serializable related
|
|
|
|
"tests/test_output_xml.py"
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for generating CycloneDX SBOMs";
|
|
|
|
homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/CycloneDX/cyclonedx-python-lib/releases/tag/v${version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|