nixpkgs/pkgs/tools/security/xsser/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

62 lines
1.6 KiB
Nix

{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook3, gobject-introspection, gtk3, pango
, pillow, pycurl, beautifulsoup4, pygeoip, pygobject3, cairocffi, selenium }:
buildPythonApplication rec {
pname = "xsser";
version = "1.8.4";
src = fetchFromGitHub {
owner = "epsylon";
repo = pname;
rev = "478242e6d8e1ca921e0ba8fa59b50106fa2f7312";
sha256 = "MsQu/r1C6uXawpuVTuBGhWNqCSZ9S2DIx15Lpo7L4RI=";
};
postPatch = ''
# Replace relative path with absolute store path
find . -type f -exec sed -i "s|core/fuzzing/user-agents.txt|$out/share/xsser/fuzzing/user-agents.txt|g" {} +
# Replace absolute path references with store paths
substituteInPlace core/main.py --replace /usr $out
substituteInPlace gtk/xsser.desktop --replace /usr $out
substituteInPlace setup.py --replace /usr/share share
'';
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
buildInputs = [
gtk3
pango
];
propagatedBuildInputs = [
pillow
pycurl
beautifulsoup4
pygeoip
pygobject3
cairocffi
selenium
];
# Project has no tests
doCheck = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
postInstall = ''
install -D core/fuzzing/user-agents.txt $out/share/xsser/fuzzing/user-agents.txt
'';
meta = with lib; {
description = "Automatic framework to detect, exploit and report XSS vulnerabilities in web-based applications";
mainProgram = "xsser";
homepage = "https://xsser.03c8.net/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ emilytrau ];
};
}