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