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