Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook, gobject-introspection, gtk3, pango 2, pillow, pycurl, beautifulsoup4, pygeoip, pygobject3, cairocffi, selenium }: 3 4buildPythonApplication rec { 5 pname = "xsser"; 6 version = "1.8.4"; 7 8 src = fetchFromGitHub { 9 owner = "epsylon"; 10 repo = pname; 11 rev = "478242e6d8e1ca921e0ba8fa59b50106fa2f7312"; 12 sha256 = "MsQu/r1C6uXawpuVTuBGhWNqCSZ9S2DIx15Lpo7L4RI="; 13 }; 14 15 postPatch = '' 16 # Replace relative path with absolute store path 17 find . -type f -exec sed -i "s|core/fuzzing/user-agents.txt|$out/share/xsser/fuzzing/user-agents.txt|g" {} + 18 19 # Replace absolute path references with store paths 20 substituteInPlace core/main.py --replace /usr $out 21 substituteInPlace gtk/xsser.desktop --replace /usr $out 22 substituteInPlace setup.py --replace /usr/share share 23 ''; 24 25 nativeBuildInputs = [ wrapGAppsHook gobject-introspection ]; 26 27 buildInputs = [ 28 gtk3 29 pango 30 ]; 31 32 propagatedBuildInputs = [ 33 pillow 34 pycurl 35 beautifulsoup4 36 pygeoip 37 pygobject3 38 cairocffi 39 selenium 40 ]; 41 42 # Project has no tests 43 doCheck = false; 44 45 dontWrapGApps = true; 46 preFixup = '' 47 makeWrapperArgs+=("''${gappsWrapperArgs[@]}") 48 ''; 49 50 postInstall = '' 51 install -D core/fuzzing/user-agents.txt $out/share/xsser/fuzzing/user-agents.txt 52 ''; 53 54 meta = with lib; { 55 description = "Automatic framework to detect, exploit and report XSS vulnerabilities in web-based applications"; 56 homepage = "https://xsser.03c8.net/"; 57 license = licenses.gpl3Only; 58 maintainers = with maintainers; [ emilytrau ]; 59 }; 60}