1{ 2 lib, 3 buildPythonPackage, 4 docker, 5 fetchFromGitHub, 6 poetry-core, 7 pytestCheckHook, 8 pythonOlder, 9 requests, 10 responses, 11}: 12 13buildPythonPackage rec { 14 pname = "securityreporter"; 15 version = "1.2.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.10"; 19 20 src = fetchFromGitHub { 21 owner = "dongit-org"; 22 repo = "python-reporter"; 23 tag = "v${version}"; 24 hash = "sha256-fpsvjbPE6iaOmLxykGSkCjkhFTmb8xhXa8pDrWN66KM="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace-fail 'version = "0.0.0"' 'version = "${version}"' 30 ''; 31 32 build-system = [ poetry-core ]; 33 34 dependencies = [ requests ]; 35 36 nativeCheckInputs = [ 37 docker 38 pytestCheckHook 39 responses 40 ]; 41 42 pythonImportsCheck = [ "reporter" ]; 43 44 disabledTestPaths = [ 45 # Test require a running Docker instance 46 "tests/functional/" 47 ]; 48 49 meta = with lib; { 50 description = "Python wrapper for the Reporter API"; 51 homepage = "https://github.com/dongit-org/python-reporter"; 52 changelog = "https://github.com/dongit-org/python-reporter/releases/tag/v${version}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}