diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2024-04-02 11:00:10 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2024-04-02 11:00:10 +0200 |
commit | 43ad1dc6edff1abe58afc8fbfed001d6d9407061 (patch) | |
tree | 92717d8885f67b8e8259b9c90b71f142eda5d9ec /pkgs/by-name/wi | |
parent | 81569bb19eb2d1339fc38873626aba7f442d3aad (diff) |
witnessme: init at 0-unstable-2023-12-06
Web Inventory tool https://github.com/byt3bl33d3r/WitnessMe
Diffstat (limited to 'pkgs/by-name/wi')
-rw-r--r-- | pkgs/by-name/wi/witnessme/package.nix | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/by-name/wi/witnessme/package.nix b/pkgs/by-name/wi/witnessme/package.nix new file mode 100644 index 0000000000000..a19a387f3185f --- /dev/null +++ b/pkgs/by-name/wi/witnessme/package.nix @@ -0,0 +1,83 @@ +{ lib +, fetchFromGitHub +, fetchpatch +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "witnessme"; + version = "0-unstable-2023-12-06"; + pyproject = true; + + src = fetchFromGitHub { + owner = "byt3bl33d3r"; + repo = "WitnessMe"; + # https://github.com/byt3bl33d3r/WitnessMe/issues/47 + rev = "16d4a377eba653315e827b0af686b948681be301"; + hash = "sha256-CMbeGLwXqpeB31x1j8qU8Bbi3EHEmLokDtqbQER1gEA="; + }; + + patches = [ + # Switch to poetry-core, https://github.com/byt3bl33d3r/WitnessMe/pull/48 + (fetchpatch { + name = "switch-poetry-core.patch"; + url = "https://github.com/byt3bl33d3r/WitnessMe/commit/147ce9fc7c9ac84712aa1ba2f7073bc2f29c8afe.patch"; + hash = "sha256-ZcIt/ueLgVlZePgxYljRFtvF5t2zlB80HsNyjheCnxI="; + }) + ]; + + pythonRelaxDeps = true; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + ]; + + build-system = with python3.pkgs; [ + poetry-core + ]; + + dependencies = with python3.pkgs; [ + aiodns + aiofiles + aiosqlite + fastapi + imgcat + jinja2 + lxml + prompt-toolkit + pydantic + pyppeteer + python-multipart + pyyaml + terminaltables + uvicorn + xmltodict + ]; + + nativeCheckInputs = with python3.pkgs; [ + httpx + pytest-asyncio + pytestCheckHook + setuptools + ]; + + pythonImportsCheck = [ + "witnessme" + ]; + + disabledTestPaths = [ + # Tests require network access + "tests/test_api.py" + "tests/test_grab.py" + "tests/test_scan.py" + "tests/test_target_parsing.py" + ]; + + meta = with lib; { + description = "Web Inventory tool"; + homepage = "https://github.com/byt3bl33d3r/WitnessMe"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + mainProgram = "witnessme"; + }; +} |