From fcb4e4480c548aaf5f3d775feea50840e549b4ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Oct 2025 01:07:55 +0200 Subject: [PATCH 1/4] python313Packages.pytest-pycodestyle: init at 2.5.0 Pytest plugin to run pycodestyle https://github.com/henry0312/pytest-pycodestyle --- .../pytest-pycodestyle/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-pycodestyle/default.nix diff --git a/pkgs/development/python-modules/pytest-pycodestyle/default.nix b/pkgs/development/python-modules/pytest-pycodestyle/default.nix new file mode 100644 index 000000000000..f51e8d124a39 --- /dev/null +++ b/pkgs/development/python-modules/pytest-pycodestyle/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pycodestyle, + pytest-isort, + pytest, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "pytest-pycodestyle"; + version = "2.5.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "henry0312"; + repo = "pytest-pycodestyle"; + tag = "v${version}"; + hash = "sha256-X/vacxI0RFHIqlZ2omzvvFDePS/SZYSFQHEmfcbvf/4="; + }; + + build-system = [ setuptools ]; + + buildInputs = [ pytest ]; + + dependencies = [ pycodestyle ]; + + nativeCheckInputs = [ + pytest-isort + pytestCheckHook + ]; + + pythonImportsCheck = [ "pytest_pycodestyle" ]; + + meta = { + description = "Pytest plugin to run pycodestyle"; + homepage = "https://github.com/henry0312/pytest-pycodestyle"; + changelog = "https://github.com/henry0312/pytest-pycodestyle/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57a9b0966e50..1782cf5592fa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14565,6 +14565,8 @@ self: super: with self; { pytest-pudb = callPackage ../development/python-modules/pytest-pudb { }; + pytest-pycodestyle = callPackage ../development/python-modules/pytest-pycodestyle { }; + pytest-pylint = callPackage ../development/python-modules/pytest-pylint { }; pytest-pytestrail = callPackage ../development/python-modules/pytest-pytestrail { }; From c2a560bee32dea42708684e2602a9971c594dd81 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Oct 2025 01:38:05 +0200 Subject: [PATCH 2/4] python313Packages.pytest-docker: init at 3.2.3 Docker-based integration tests https://github.com/avast/pytest-docker --- .../python-modules/pytest-docker/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-docker/default.nix diff --git a/pkgs/development/python-modules/pytest-docker/default.nix b/pkgs/development/python-modules/pytest-docker/default.nix new file mode 100644 index 000000000000..e16888e1b635 --- /dev/null +++ b/pkgs/development/python-modules/pytest-docker/default.nix @@ -0,0 +1,64 @@ +{ + lib, + attrs, + buildPythonPackage, + fetchFromGitHub, + py, + pytest-mypy, + pytest-pycodestyle, + pytest-pylint, + pytest, + pytestCheckHook, + requests, + setuptools, + types-requests, + types-setuptools, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage rec { + pname = "pytest-docker"; + version = "3.2.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "avast"; + repo = "pytest-docker"; + tag = "v${version}"; + hash = "sha256-LV4v4vyfXwFHOYJdS3kPyPbFWpwXfx1rKZQfFQ0pdQ4="; + }; + + build-system = [ setuptools ]; + + buildInputs = [ pytest ]; + + dependencies = [ attrs ]; + + nativeCheckInputs = [ + py + pytest-mypy + pytest-pycodestyle + pytest-pylint + pytestCheckHook + requests + types-requests + types-setuptools + writableTmpDirAsHomeHook + ]; + + pythonImportsCheck = [ "pytest_docker" ]; + + disabledTests = [ + # Tests wants to run docker + "test_containers_and_volumes_get_cleaned_up" + "test_main_fixtures_work" + ]; + + meta = { + description = "Docker-based integration tests"; + homepage = "https://github.com/avast/pytest-docker"; + changelog = "https://github.com/avast/pytest-docker/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1782cf5592fa..560ecc8aa937 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14451,6 +14451,8 @@ self: super: with self; { pytest-django = callPackage ../development/python-modules/pytest-django { }; + pytest-docker = callPackage ../development/python-modules/pytest-docker { }; + pytest-docker-tools = callPackage ../development/python-modules/pytest-docker-tools { }; pytest-doctestplus = callPackage ../development/python-modules/pytest-doctestplus { }; From de8ec6019ba9059f94a13536b19829efd32519d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Oct 2025 01:45:57 +0200 Subject: [PATCH 3/4] python313Packages.zundler: init at 0.3.0 Bundle assets of distributed HTML docs into one self-contained HTML file https://github.com/AdrianVollmer/Zundler --- .../python-modules/zundler/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/zundler/default.nix diff --git a/pkgs/development/python-modules/zundler/default.nix b/pkgs/development/python-modules/zundler/default.nix new file mode 100644 index 000000000000..2a1ac8f8195f --- /dev/null +++ b/pkgs/development/python-modules/zundler/default.nix @@ -0,0 +1,60 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatch-vcs, + hatchling, + lxml, + nox, + pytest-docker, + pytest-selenium, + pytestCheckHook, + python-magic, + selenium, + sphinx, +}: + +buildPythonPackage rec { + pname = "zundler"; + version = "0.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "AdrianVollmer"; + repo = "Zundler"; + tag = version; + hash = "sha256-RUzVeJLRB9y6lS0tCkseoFgND1MXT7s2o7vNuUpdRDE="; + }; + + build-system = [ + hatch-vcs + hatchling + ]; + + dependencies = [ + lxml + python-magic + sphinx + ]; + + nativeCheckInputs = [ + nox + pytestCheckHook + pytest-docker + pytest-selenium + selenium + ]; + + # Tests are container-based + doCheck = false; + + pythonImportsCheck = [ "zundler" ]; + + meta = { + description = "Bundle assets of distributed HTML docs into one self-contained HTML file"; + homepage = "https://github.com/AdrianVollmer/Zundler"; + changelog = "https://github.com/AdrianVollmer/Zundler/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 560ecc8aa937..91b707f653e3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20617,6 +20617,8 @@ self: super: with self; { zulip-emoji-mapping = callPackage ../development/python-modules/zulip-emoji-mapping { }; + zundler = callPackage ../development/python-modules/zundler { }; + zwave-js-server-python = callPackage ../development/python-modules/zwave-js-server-python { }; zwave-me-ws = callPackage ../development/python-modules/zwave-me-ws { }; From d78f8a5999f0fed81012af9a994478a8df585464 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Oct 2025 01:52:50 +0200 Subject: [PATCH 4/4] smbcrawler: init at 1.2.0 Tool that takes credentials and a list of hosts and crawls through shares https://github.com/SySS-Research/smbcrawler --- pkgs/by-name/sm/smbcrawler/package.nix | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pkgs/by-name/sm/smbcrawler/package.nix diff --git a/pkgs/by-name/sm/smbcrawler/package.nix b/pkgs/by-name/sm/smbcrawler/package.nix new file mode 100644 index 000000000000..4938f1953c75 --- /dev/null +++ b/pkgs/by-name/sm/smbcrawler/package.nix @@ -0,0 +1,60 @@ +{ + lib, + fetchFromGitHub, + python3, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "smbcrawler"; + version = "1.2.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "SySS-Research"; + repo = "smbcrawler"; + tag = version; + hash = "sha256-9hom/4wNCiBp70s0a3K4dq1BOcoVV+yAeiPQlvQ7yUw="; + }; + + build-system = with python3.pkgs; [ + hatch-vcs + hatchling + ]; + + dependencies = with python3.pkgs; [ + click + impacket + lxml + peewee + python-libnmap + python-magic + pyyaml + xdg-base-dirs + zundler + ]; + + optional-dependencies = with python3.pkgs; { + binary-conversion = [ + markitdown + ]; + }; + + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; + + pythonImportsCheck = [ "smbcrawler" ]; + + disabledTests = [ + # Tests are container-based + "test_base_guest_access" + "test_full" + ]; + + meta = { + description = "Tool that takes credentials and a list of hosts and crawls through shares"; + homepage = "https://github.com/SySS-Research/smbcrawler"; + changelog = "https://github.com/SySS-Research/smbcrawler/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "smbcrawler"; + }; +}