diff options
author | freezeboy <freezeboy@users.noreply.github.com> | 2020-12-27 14:27:54 +0100 |
---|---|---|
committer | freezeboy <freezeboy@users.noreply.github.com> | 2021-01-18 09:12:27 +0100 |
commit | 955e258c059caeaa47da07e1278af2f268c3dbff (patch) | |
tree | b8be61264755d7f02e1172d417eb681be3a4a0ce /pkgs | |
parent | 426a0a6c9deed61def77dabe1c068950aaa35c23 (diff) | |
download | nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar.gz nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar.bz2 nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar.lz nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar.xz nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.tar.zst nixpkgs-955e258c059caeaa47da07e1278af2f268c3dbff.zip |
burpsuite: change derivtion to ease src overriding
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/networking/burpsuite/default.nix | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/pkgs/tools/networking/burpsuite/default.nix b/pkgs/tools/networking/burpsuite/default.nix index 8e185eeaa62..55bd5910054 100644 --- a/pkgs/tools/networking/burpsuite/default.nix +++ b/pkgs/tools/networking/burpsuite/default.nix @@ -1,28 +1,34 @@ -{ lib, stdenv, fetchurl, jdk11, runtimeShell }: +{ lib, stdenv, fetchurl, jdk11, runtimeShell, unzip, chromium }: -let +stdenv.mkDerivation rec { + pname = "burpsuite"; version = "2020.12.1"; - jar = fetchurl { + + src = fetchurl { name = "burpsuite.jar"; url = "https://portswigger.net/Burp/Releases/Download?productId=100&version=${version}&type=Jar"; - sha256 = "1vdxwasvcyxyyidq3cfjphzkir358sxikgvxgl36czylap4hzjh1"; + sha256 = "AcoPyVXUf2YGfX2/GbtGZeQ4P7zSsYFb9L57trXive0="; }; - launcher = '' - #!${runtimeShell} - exec ${jdk11}/bin/java -jar ${jar} "$@" - ''; -in stdenv.mkDerivation { - pname = "burpsuite"; - inherit version; - buildCommand = '' + + dontUnpack = true; + dontBuild = true; + installPhase = '' + runHook preInstall + mkdir -p $out/bin - echo "${launcher}" > $out/bin/burpsuite + 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 + + runHook postInstall ''; preferLocalBuild = true; - meta = { + meta = with lib; { description = "An integrated platform for performing security testing of web applications"; longDescription = '' Burp Suite is an integrated platform for performing security testing of web applications. @@ -32,9 +38,9 @@ in stdenv.mkDerivation { ''; homepage = "https://portswigger.net/burp/"; downloadPage = "https://portswigger.net/burp/freedownload"; - license = [ lib.licenses.unfree ]; + license = licenses.unfree; platforms = jdk11.meta.platforms; hydraPlatforms = []; - maintainers = with lib.maintainers; [ bennofs ]; + maintainers = with maintainers; [ bennofs ]; }; } |