diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2024-04-03 23:25:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 23:25:03 +0200 |
commit | 2fc48ba83f697c0de6c47451b8adf56bc2dcd02f (patch) | |
tree | 10187c209e941fc2fddaeed50848acbe10a1bc02 /pkgs/by-name/wi | |
parent | d9b45d7e7200adb65aae6c9b2fe01a6202f8882d (diff) | |
parent | 43ad1dc6edff1abe58afc8fbfed001d6d9407061 (diff) |
Merge pull request #300909 from fabaff/witnessme
witnessme: init at 0-unstable-2023-12-06
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"; + }; +} |