nixpkgs/pkgs/by-name/bu/burpsuite/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

111 lines
2.8 KiB
Nix

{
lib,
buildFHSEnv,
fetchurl,
jdk,
makeDesktopItem,
proEdition ? false,
unzip,
}:
let
version = "2024.8.5";
product =
if proEdition then
{
productName = "pro";
productDesktop = "Burp Suite Professional Edition";
hash = "sha256-bG1+U16qRNnHHhjloUIMxBH7/zKRo0b3tEX1ebsClL4=";
}
else
{
productName = "community";
productDesktop = "Burp Suite Community Edition";
hash = "sha256-rUDG2L/MC6vX58If7rLHKd73hyV2lSdO1ZZu9tDaznM=";
};
src = fetchurl {
name = "burpsuite.jar";
urls = [
"https://portswigger-cdn.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
"https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
"https://web.archive.org/web/https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
];
hash = product.hash;
};
pname = "burpsuite";
description = "An integrated platform for performing security testing of web applications";
desktopItem = makeDesktopItem {
name = "burpsuite";
exec = pname;
icon = pname;
desktopName = product.productDesktop;
comment = description;
categories = [
"Development"
"Security"
"System"
];
};
in
buildFHSEnv {
inherit pname version;
runScript = "${jdk}/bin/java -jar ${src}";
targetPkgs =
pkgs: with pkgs; [
alsa-lib
at-spi2-core
cairo
cups
dbus
expat
glib
gtk3
gtk3-x11
jython
libcanberra-gtk3
libdrm
udev
libxkbcommon
mesa
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
];
extraInstallCommands = ''
mkdir -p "$out/share/pixmaps"
${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64${product.productName}.png > "$out/share/pixmaps/burpsuite.png"
cp -r ${desktopItem}/share/applications $out/share
'';
meta = with lib; {
inherit description;
longDescription = ''
Burp Suite is an integrated platform for performing security testing of web applications.
Its various tools work seamlessly together to support the entire testing process, from
initial mapping and analysis of an application's attack surface, through to finding and
exploiting security vulnerabilities.
'';
homepage = "https://portswigger.net/burp/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.unfree;
platforms = jdk.meta.platforms;
hydraPlatforms = [ ];
maintainers = with maintainers; [ bennofs ];
mainProgram = "burpsuite";
};
}