From 5d6bc872ce3a891e917918d5691cc2169c297afb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Jan 2021 22:50:18 +0100 Subject: [PATCH 1/3] wfuzz: 2.4.2 -> 3.1.0 --- .../python-modules/wfuzz/default.nix | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index a43aa915ea0b..afd007409c97 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -1,5 +1,6 @@ { buildPythonPackage , chardet +, colorama , configparser , fetchFromGitHub , future @@ -8,38 +9,49 @@ , mock , netaddr , pkgs -, pyparsing , pycurl +, pyparsing , pytest +, setuptools , six +, stdenv }: buildPythonPackage rec { pname = "wfuzz"; - version = "2.4.2"; + version = "3.1.0"; src = fetchFromGitHub { owner = "xmendez"; repo = pname; - rev = "v.${version}"; - sha256 = "15dihrc7jsvpxcmb4fp254s633mkjm7ksjfkr9pqaai49qmnddyf"; + rev = "v${version}"; + sha256 = "1izasczm2zwknwzxbfzqhlf4zp02jvb54ha1hfk4rlwiz0rr1kj4"; }; - buildInputs = [ pyparsing configparser ]; - propagatedBuildInputs = [ chardet - future pycurl six + setuptools + pyparsing + ] ++ lib.optionals isPy27 [ + mock + future + ] ++ lib.optionals stdenv.hostPlatform.isWindows [ + colorama ]; - checkInputs = [ netaddr pytest ] ++ lib.optionals isPy27 [ mock ]; + checkInputs = [ + netaddr + pytest + ] ++ lib.optionals isPy27 [ + mock + ]; - # Skip tests requiring a local web server. + # The skipped tests are requiring a local web server checkPhase = '' HOME=$TMPDIR pytest \ - tests/test_{moduleman,filterintro,reqresp,api,clparser,dotdict}.py + tests/test_{moduleman,filterintro,reqresp,api,clparser}.py ''; meta = with lib; { From b56672e5013f03dc6e706d47d382e324f1df2ef3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Jan 2021 22:51:26 +0100 Subject: [PATCH 2/3] wfuzz: update attributes --- pkgs/development/python-modules/wfuzz/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index afd007409c97..f6a86b7b5ed5 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -55,9 +55,14 @@ buildPythonPackage rec { ''; meta = with lib; { - description = "Web content fuzzer, to facilitate web applications assessments"; + description = "Web content fuzzer to facilitate web applications assessments"; + longDescription = '' + Wfuzz provides a framework to automate web applications security assessments + and could help you to secure your web applications by finding and exploiting + web application vulnerabilities. + ''; homepage = "https://wfuzz.readthedocs.io"; - license = licenses.gpl2; + license = with licenses; [ gpl2Only ]; maintainers = with maintainers; [ pamplemousse ]; }; } From 24ad2c84c82427d5309e33fab37c30d530565a31 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Jan 2021 22:53:04 +0100 Subject: [PATCH 3/3] wfuzz: switch to pytestCheckHook --- pkgs/development/python-modules/wfuzz/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index f6a86b7b5ed5..f42df0054952 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -12,6 +12,7 @@ , pycurl , pyparsing , pytest +, pytestCheckHook , setuptools , six , stdenv @@ -44,15 +45,15 @@ buildPythonPackage rec { checkInputs = [ netaddr pytest + pytestCheckHook ] ++ lib.optionals isPy27 [ mock ]; + preCheck = "export HOME=$(mktemp -d)"; # The skipped tests are requiring a local web server - checkPhase = '' - HOME=$TMPDIR pytest \ - tests/test_{moduleman,filterintro,reqresp,api,clparser}.py - ''; + pytestFlagsArray = [ "tests/test_{moduleman,filterintro,reqresp,api,clparser}.py" ]; + pythonImportsCheck = [ "wfuzz" ]; meta = with lib; { description = "Web content fuzzer to facilitate web applications assessments";