rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / tools / networking / burpsuite / default.nix
blobbc3ab38b74847e47b214faa623dd58e534269fe2
1 { lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem, proEdition ? false }:
2 let
3   version = "2024.1.1.4";
5   product = if proEdition then {
6     productName = "pro";
7     productDesktop = "Burp Suite Professional Edition";
8     hash = "sha256-jJUTsNF7Jy2VbFBIW7ha/ty9ZwVyVX1cTKNZJgD7zg4=";
9   } else {
10     productName = "community";
11     productDesktop = "Burp Suite Community Edition";
12     hash = "sha256-VkrI1M4lCdCuQypHSd2W5X6LyqLUhnbKZKMVj0w4THE=";
13   };
15   src = fetchurl {
16     name = "burpsuite.jar";
17     urls = [
18       "https://portswigger-cdn.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
19       "https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
20       "https://web.archive.org/web/https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
21     ];
22     hash = product.hash;
23   };
25   pname = "burpsuite";
26   description = "An integrated platform for performing security testing of web applications";
27   desktopItem = makeDesktopItem {
28     name = "burpsuite";
29     exec = pname;
30     icon = pname;
31     desktopName = product.productDesktop;
32     comment = description;
33     categories = [ "Development" "Security" "System" ];
34   };
37 buildFHSEnv {
38   inherit pname version;
40   runScript = "${jdk}/bin/java -jar ${src}";
42   targetPkgs = pkgs: with pkgs; [
43     alsa-lib
44     at-spi2-core
45     cairo
46     cups
47     dbus
48     expat
49     glib
50     gtk3
51     libcanberra-gtk3
52     libdrm
53     libudev0-shim
54     libxkbcommon
55     mesa.drivers
56     nspr
57     nss
58     pango
59     gtk3-x11
60     xorg.libX11
61     xorg.libxcb
62     xorg.libXcomposite
63     xorg.libXdamage
64     xorg.libXext
65     xorg.libXfixes
66     xorg.libXrandr
67   ];
69   extraInstallCommands = ''
70     mkdir -p "$out/share/pixmaps"
71     ${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64${product.productName}.png > "$out/share/pixmaps/burpsuite.png"
72     cp -r ${desktopItem}/share/applications $out/share
73   '';
75   meta = with lib; {
76     inherit description;
77     longDescription = ''
78       Burp Suite is an integrated platform for performing security testing of web applications.
79       Its various tools work seamlessly together to support the entire testing process, from
80       initial mapping and analysis of an application's attack surface, through to finding and
81       exploiting security vulnerabilities.
82     '';
83     homepage = "https://portswigger.net/burp/";
84     sourceProvenance = with sourceTypes; [ binaryBytecode ];
85     license = licenses.unfree;
86     platforms = jdk.meta.platforms;
87     hydraPlatforms = [ ];
88     maintainers = with maintainers; [ arcayr bennofs ];
89     mainProgram = "burpsuite";
90   };