From 7022cb768a7f0c02ea365af9bb1da217cfbaddfa Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 10 Jan 2023 22:13:45 -0500 Subject: [PATCH] burpsuite: 2021.12 -> 2022.12.7 https://portswigger.net/burp/releases/professional-community-2022-12-7?requestededition=community The package is now using buildFHSUserEnv. This is needed to get the integrated browser to work. --- pkgs/tools/networking/burpsuite/default.nix | 61 ++++++++++++--------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/pkgs/tools/networking/burpsuite/default.nix b/pkgs/tools/networking/burpsuite/default.nix index 846c966d00c4..7a800045fd0f 100644 --- a/pkgs/tools/networking/burpsuite/default.nix +++ b/pkgs/tools/networking/burpsuite/default.nix @@ -1,35 +1,46 @@ -{ lib, stdenv, fetchurl, jdk11, runtimeShell, unzip, chromium }: - -stdenv.mkDerivation rec { - pname = "burpsuite"; - version = "2021.12"; +{ lib, fetchurl, jdk, buildFHSUserEnv }: +let + version = "2022.12.7"; src = fetchurl { name = "burpsuite.jar"; urls = [ - "https://portswigger.net/Burp/Releases/Download?productId=100&version=${version}&type=Jar" - "https://web.archive.org/web/https://portswigger.net/Burp/Releases/Download?productId=100&version=${version}&type=Jar" + "https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" + "https://web.archive.org/web/https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" ]; - sha256 = "sha256-BLX/SgHctXciOZoA6Eh4zuDJoxNSZgvoj2Teg1fV80g="; + sha256 = "2e354c2aadc58267bc282dde462d20b3aca7108077eb141d49f89a16172763cf"; }; - dontUnpack = true; - dontBuild = true; - installPhase = '' - runHook preInstall +in +buildFHSUserEnv { + name = "burpsuite"; - mkdir -p $out/bin - echo '#!${runtimeShell} - eval "$(${unzip}/bin/unzip -p ${src} chromium.properties)" - mkdir -p "$HOME/.BurpSuite/burpbrowser/$linux64" - ln -sf "${chromium}/bin/chromium" "$HOME/.BurpSuite/burpbrowser/$linux64/chrome" - exec ${jdk11}/bin/java -jar ${src} "$@"' > $out/bin/burpsuite - chmod +x $out/bin/burpsuite + runScript = "${jdk}/bin/java -jar ${src}"; - runHook postInstall - ''; - - preferLocalBuild = true; + targetPkgs = pkgs: with pkgs; [ + alsa-lib + at-spi2-core + cairo + cups + dbus + expat + glib + gtk3 + libdrm + libudev0-shim + libxkbcommon + mesa.drivers + nspr + nss + pango + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + ]; meta = with lib; { description = "An integrated platform for performing security testing of web applications"; @@ -43,8 +54,8 @@ stdenv.mkDerivation rec { downloadPage = "https://portswigger.net/burp/freedownload"; sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.unfree; - platforms = jdk11.meta.platforms; - hydraPlatforms = []; + platforms = jdk.meta.platforms; + hydraPlatforms = [ ]; maintainers = with maintainers; [ bennofs ]; }; }