diff options
Diffstat (limited to 'pkgs/development/python-modules/wfuzz/default.nix')
-rw-r--r-- | pkgs/development/python-modules/wfuzz/default.nix | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 1bc512398bd0..71577257d228 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -1,51 +1,62 @@ -{ lib -, stdenv -, buildPythonPackage -, chardet -, colorama -, fetchFromGitHub -, netaddr -, pycurl -, pyparsing -, pytest -, pytestCheckHook -, pythonOlder -, setuptools -, six +{ + lib, + stdenv, + buildPythonPackage, + chardet, + colorama, + distutils, + fetchFromGitHub, + netaddr, + pycurl, + pyparsing, + pytestCheckHook, + pythonOlder, + setuptools, + six, + fetchpatch2, }: buildPythonPackage rec { pname = "wfuzz"; version = "3.1.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "xmendez"; - repo = pname; - rev = "v${version}"; + repo = "wfuzz"; + rev = "refs/tags/v${version}"; hash = "sha256-RM6QM/iR00ymg0FBUtaWAtxPHIX4u9U/t5N/UT/T6sc="; }; + patches = [ + # replace use of imp module for Python 3.12 + # https://github.com/xmendez/wfuzz/pull/365 + (fetchpatch2 { + url = "https://github.com/xmendez/wfuzz/commit/f4c028b9ada4c36dabf3bc752f69f6ddc110920f.patch?full_index=1"; + hash = "sha256-t7pUMcdFmwAsGUNBRdZr+Jje/yR0yzeGIgeYNEq4hFE="; + }) + ]; + postPatch = '' substituteInPlace setup.py \ - --replace "pyparsing>=2.4*" "pyparsing>=2.4" + --replace-fail "pyparsing>=2.4*" "pyparsing>=2.4" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ chardet + distutils # src/wfuzz/plugin_api/base.py pycurl six setuptools pyparsing - ] ++ lib.optionals stdenv.hostPlatform.isWindows [ - colorama - ]; + ] ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]; nativeCheckInputs = [ netaddr - pytest pytestCheckHook ]; @@ -57,11 +68,11 @@ buildPythonPackage rec { # The tests are requiring a local web server "tests/test_acceptance.py" "tests/acceptance/test_saved_filter.py" + # depends on imp module removed from Python 3.12 + "tests/test_moduleman.py" ]; - pythonImportsCheck = [ - "wfuzz" - ]; + pythonImportsCheck = [ "wfuzz" ]; postInstall = '' mkdir -p $out/share/wordlists/wfuzz @@ -69,6 +80,7 @@ buildPythonPackage rec { ''; meta = with lib; { + changelog = "https://github.com/xmendez/wfuzz/releases/tag/v${version}"; description = "Web content fuzzer to facilitate web applications assessments"; longDescription = '' Wfuzz provides a framework to automate web applications security assessments |