Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 defusedxml, 5 fetchFromGitHub, 6 marshmallow, 7 pytest-datafiles, 8 pytest-vcr, 9 pytestCheckHook, 10 python-box, 11 python-dateutil, 12 pythonOlder, 13 requests, 14 requests-pkcs12, 15 requests-toolbelt, 16 responses, 17 restfly, 18 semver, 19 setuptools, 20 typing-extensions, 21}: 22 23buildPythonPackage rec { 24 pname = "pytenable"; 25 version = "1.5.0"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.7"; 29 30 src = fetchFromGitHub { 31 owner = "tenable"; 32 repo = "pyTenable"; 33 rev = "refs/tags/${version}"; 34 hash = "sha256-uLZ1TQx5awHOOF+IR3aWTwwYTd71O/V+EHaDrb1LAXU="; 35 }; 36 37 pythonRelaxDeps = [ "defusedxml" ]; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 defusedxml 43 marshmallow 44 python-box 45 python-dateutil 46 requests 47 requests-toolbelt 48 restfly 49 semver 50 typing-extensions 51 ]; 52 53 nativeCheckInputs = [ 54 pytest-datafiles 55 pytest-vcr 56 pytestCheckHook 57 requests-pkcs12 58 responses 59 ]; 60 61 disabledTestPaths = [ 62 # Disable tests that requires network access 63 "tests/io/" 64 ]; 65 66 disabledTests = [ 67 # Disable tests that requires a Docker container 68 "test_uploads_docker_push_name_typeerror" 69 "test_uploads_docker_push_tag_typeerror" 70 "test_uploads_docker_push_cs_name_typeerror" 71 "test_uploads_docker_push_cs_tag_typeerror" 72 # Test requires network access 73 "test_assets_list_vcr" 74 "test_events_list_vcr" 75 ]; 76 77 pythonImportsCheck = [ "tenable" ]; 78 79 meta = with lib; { 80 description = "Python library for the Tenable.io and TenableSC API"; 81 homepage = "https://github.com/tenable/pyTenable"; 82 changelog = "https://github.com/tenable/pyTenable/releases/tag/${version}"; 83 license = with licenses; [ mit ]; 84 maintainers = with maintainers; [ fab ]; 85 }; 86}