vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / by-name / wi / witnessme / package.nix
blobde83d1475360af36c1f342cb56fcb589ae3b6b26
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , python3
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "witnessme";
9   version = "0-unstable-2023-12-06";
10   pyproject = true;
12   src = fetchFromGitHub {
13     owner = "byt3bl33d3r";
14     repo = "WitnessMe";
15     # https://github.com/byt3bl33d3r/WitnessMe/issues/47
16     rev = "16d4a377eba653315e827b0af686b948681be301";
17     hash = "sha256-CMbeGLwXqpeB31x1j8qU8Bbi3EHEmLokDtqbQER1gEA=";
18   };
20   patches = [
21     # Switch to poetry-core, https://github.com/byt3bl33d3r/WitnessMe/pull/48
22     (fetchpatch {
23       name = "switch-poetry-core.patch";
24       url = "https://github.com/byt3bl33d3r/WitnessMe/commit/147ce9fc7c9ac84712aa1ba2f7073bc2f29c8afe.patch";
25       hash = "sha256-ZcIt/ueLgVlZePgxYljRFtvF5t2zlB80HsNyjheCnxI=";
26     })
27   ];
29   pythonRelaxDeps = true;
31   build-system = with python3.pkgs; [
32     poetry-core
33   ];
35   dependencies = with python3.pkgs; [
36     aiodns
37     aiofiles
38     aiosqlite
39     fastapi
40     imgcat
41     jinja2
42     lxml
43     prompt-toolkit
44     pydantic
45     pyppeteer
46     python-multipart
47     pyyaml
48     terminaltables
49     uvicorn
50     xmltodict
51   ];
53   nativeCheckInputs = with python3.pkgs; [
54     httpx
55     pytest-asyncio
56     pytestCheckHook
57     setuptools
58   ];
60   pythonImportsCheck = [
61     "witnessme"
62   ];
64   disabledTestPaths = [
65     # Tests require network access
66     "tests/test_api.py"
67     "tests/test_grab.py"
68     "tests/test_scan.py"
69     "tests/test_target_parsing.py"
70   ];
72   meta = with lib; {
73     description = "Web Inventory tool";
74     homepage = "https://github.com/byt3bl33d3r/WitnessMe";
75     license = licenses.gpl3Only;
76     maintainers = with maintainers; [ fab ];
77     mainProgram = "witnessme";
78   };