Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 beartype, 4 buildPythonPackage, 5 click, 6 fetchFromGitHub, 7 license-expression, 8 ply, 9 pytestCheckHook, 10 pythonOlder, 11 pyyaml, 12 rdflib, 13 semantic-version, 14 setuptools, 15 setuptools-scm, 16 uritools, 17 xmltodict, 18}: 19 20buildPythonPackage rec { 21 pname = "spdx-tools"; 22 version = "0.8.2"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "spdx"; 29 repo = "tools-python"; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-KB+tfuz0ZnoQcMX3H+IZXjcmPZ4x2ecl8ofz1/3r0/8="; 32 }; 33 34 nativeBuildInputs = [ 35 setuptools 36 setuptools-scm 37 ]; 38 39 propagatedBuildInputs = [ 40 beartype 41 click 42 license-expression 43 ply 44 pyyaml 45 rdflib 46 semantic-version 47 uritools 48 xmltodict 49 ]; 50 51 nativeCheckInputs = [ pytestCheckHook ]; 52 53 pythonImportsCheck = [ "spdx_tools.spdx" ]; 54 55 disabledTestPaths = [ 56 # Test depends on the currently not packaged pyshacl module 57 "tests/spdx3/validation/json_ld/test_shacl_validation.py" 58 ]; 59 60 disabledTests = [ 61 # Missing files 62 "test_spdx2_convert_to_spdx3" 63 "test_json_writer" 64 ]; 65 66 meta = with lib; { 67 description = "SPDX parser and tools"; 68 homepage = "https://github.com/spdx/tools-python"; 69 changelog = "https://github.com/spdx/tools-python/blob/v${version}/CHANGELOG.md"; 70 license = licenses.asl20; 71 maintainers = with maintainers; [ fab ]; 72 }; 73}