From c8d03f8a7e956e65b56c4d300c2bfb0f1f17e2a0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Sep 2023 17:51:14 +0200 Subject: [PATCH 1/2] python311Packages.autoslot: ini at 2022.12.1 --- .../python-modules/autoslot/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/autoslot/default.nix diff --git a/pkgs/development/python-modules/autoslot/default.nix b/pkgs/development/python-modules/autoslot/default.nix new file mode 100644 index 000000000000..c234b35e0e58 --- /dev/null +++ b/pkgs/development/python-modules/autoslot/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "autoslot"; + version = "2022.12.1"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "cjrh"; + repo = "autoslot"; + rev = "refs/tags/v${version}"; + hash = "sha256-fG4rRwRubJt2aXChEsMybEKal6LscZI7GA2uwtK5Vtg="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'requires = ["flit"]' 'requires = ["flit_core"]' \ + --replace 'build-backend = "flit.buildapi"' 'build-backend = "flit_core.buildapi"' + ''; + + nativeBuildInputs = [ + flit-core + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "autoslot" + ]; + + meta = with lib; { + description = "Automatic __slots__ for your Python classes"; + homepage = "https://github.com/cjrh/autoslot"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fec0a172480a..ccd2a9056fe7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -910,6 +910,8 @@ self: super: with self; { autopep8 = callPackage ../development/python-modules/autopep8 { }; + autoslot = callPackage ../development/python-modules/autoslot { }; + avahi = toPythonModule (pkgs.avahi.override { inherit python; withPython = true; From 37256bfd6a5ec2533f6caa4be3e9f89245a84b51 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Sep 2023 17:56:56 +0200 Subject: [PATCH 2/2] ghunt: init at 2.0.1 Offensive Google framework https://github.com/mxrch/ghunt --- pkgs/by-name/gh/ghunt/package.nix | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkgs/by-name/gh/ghunt/package.nix diff --git a/pkgs/by-name/gh/ghunt/package.nix b/pkgs/by-name/gh/ghunt/package.nix new file mode 100644 index 000000000000..ff4e7340409f --- /dev/null +++ b/pkgs/by-name/gh/ghunt/package.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "ghunt"; + version = "2.0.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "mxrch"; + repo = "ghunt"; + rev = "refs/tags/v${version}"; + hash = "sha256-7awLKX+1fVbufg3++lUUCZg4p07c2yGeefiPFcE1Ij4="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + alive-progress + autoslot + beautifulsoup4 + beautifultable + geopy + httpx + humanize + imagehash + inflection + jsonpickle + pillow + protobuf + python-dateutil + rich + trio + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "ghunt" + ]; + + meta = with lib; { + description = "Offensive Google framework"; + homepage = "https://github.com/mxrch/ghunt"; + changelog = "https://github.com/mxrch/GHunt/releases/tag/v${version}"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ fab ]; + }; +}