From 98cddee95bf2ae2bb25623d3859379dfea155059 Mon Sep 17 00:00:00 2001 From: octodi Date: Tue, 26 Dec 2023 22:57:50 +0530 Subject: [PATCH] caido: init at 0.29.2 Removed OZONE flags as it not an electron app Added changelog Added WEBKIT_DISABLE_COMPOSITING_MODE env variable Added mainProgram and sourceProvenance Co-Authored-By: Fabian Affolter Co-Authored-By: Arthur <150680976+arthsmn@users.noreply.github.com> Co-Authored-By: Peder Bergebakken Sundt --- pkgs/by-name/ca/caido/package.nix | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/by-name/ca/caido/package.nix diff --git a/pkgs/by-name/ca/caido/package.nix b/pkgs/by-name/ca/caido/package.nix new file mode 100644 index 000000000000..f7da4eaef797 --- /dev/null +++ b/pkgs/by-name/ca/caido/package.nix @@ -0,0 +1,43 @@ +{ lib +, fetchurl +, appimageTools +, makeWrapper +}: + +let + pname = "caido"; + version = "0.29.2"; + src = fetchurl { + url = "https://storage.googleapis.com/caido-releases/v${version}/caido-desktop-linux-v${version}-e0f8102b.AppImage"; + hash = "sha256-4PgQK52LAX1zacmoUK0muIhrvFDF7anQ6sx35I+ErVs="; + }; + appimageContents = appimageTools.extractType2 { inherit pname src version; }; + +in appimageTools.wrapType2 { + inherit pname src version; + + extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libthai ]; + + extraInstallCommands = '' + mv $out/bin/${pname}-${version} $out/bin/${pname} + install -m 444 -D ${appimageContents}/caido.desktop -t $out/share/applications + substituteInPlace $out/share/applications/caido.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + install -m 444 -D ${appimageContents}/caido.png \ + $out/share/icons/hicolor/512x512/apps/caido.png + source "${makeWrapper}/nix-support/setup-hook" + wrapProgram $out/bin/${pname} \ + --set WEBKIT_DISABLE_COMPOSITING_MODE 1 + ''; + + meta = with lib; { + description = "A lightweight web security auditing toolkit"; + homepage = "https://caido.io/"; + changelog = "https://github.com/caido/caido/releases/tag/v${version}"; + license = licenses.unfree; + maintainers = with maintainers; [ octodi ]; + mainProgram = "caido"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + platforms = [ "x86_64-linux" ]; + }; +}