about summary refs log tree commit diff
path: root/pkgs/development/python-modules/wfuzz/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/wfuzz/default.nix')
-rw-r--r--pkgs/development/python-modules/wfuzz/default.nix48
1 files changed, 33 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix
index a43aa915ea0b..f42df0054952 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,44 +9,61 @@
 , mock
 , netaddr
 , pkgs
-, pyparsing
 , pycurl
+, pyparsing
 , pytest
+, pytestCheckHook
+, 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
+    pytestCheckHook
+  ] ++ lib.optionals isPy27 [
+    mock
+  ];
 
-  # Skip tests requiring a local web server.
-  checkPhase = ''
-    HOME=$TMPDIR pytest \
-      tests/test_{moduleman,filterintro,reqresp,api,clparser,dotdict}.py
-  '';
+  preCheck = "export HOME=$(mktemp -d)";
+  # The skipped tests are requiring a local web server
+  pytestFlagsArray = [ "tests/test_{moduleman,filterintro,reqresp,api,clparser}.py" ];
+  pythonImportsCheck = [ "wfuzz" ];
 
   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 ];
   };
 }