2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
2023-08-22 20:05:09 +00:00
|
|
|
, beartype
|
2021-04-25 03:57:28 +00:00
|
|
|
, buildPythonPackage
|
2021-10-11 16:52:03 +00:00
|
|
|
, click
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, license-expression
|
2021-04-25 03:57:28 +00:00
|
|
|
, ply
|
|
|
|
, pytestCheckHook
|
2021-10-11 16:52:03 +00:00
|
|
|
, pythonOlder
|
2023-08-22 20:05:09 +00:00
|
|
|
, pyyaml
|
|
|
|
, rdflib
|
|
|
|
, semantic-version
|
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2023-05-24 13:37:59 +00:00
|
|
|
, uritools
|
2023-08-22 20:05:09 +00:00
|
|
|
, xmltodict
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spdx-tools";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.8.2";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "pyproject";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spdx";
|
|
|
|
repo = "tools-python";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-KB+tfuz0ZnoQcMX3H+IZXjcmPZ4x2ecl8ofz1/3r0/8=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
beartype
|
2021-10-11 16:52:03 +00:00
|
|
|
click
|
2023-08-22 20:05:09 +00:00
|
|
|
license-expression
|
2021-10-11 16:52:03 +00:00
|
|
|
ply
|
2021-04-25 03:57:28 +00:00
|
|
|
pyyaml
|
|
|
|
rdflib
|
2023-08-22 20:05:09 +00:00
|
|
|
semantic-version
|
2023-05-24 13:37:59 +00:00
|
|
|
uritools
|
2021-04-25 03:57:28 +00:00
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
2023-08-22 20:05:09 +00:00
|
|
|
"spdx_tools.spdx"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Test depends on the currently not packaged pyshacl module
|
|
|
|
"tests/spdx3/validation/json_ld/test_shacl_validation.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Missing files
|
|
|
|
"test_spdx2_convert_to_spdx3"
|
|
|
|
"test_json_writer"
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SPDX parser and tools";
|
|
|
|
homepage = "https://github.com/spdx/tools-python";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/spdx/tools-python/blob/v${version}/CHANGELOG.md";
|
2021-04-25 03:57:28 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
}
|