20 url = "https://storage.googleapis.com/caido-releases/v${version}/caido-cli-v${version}-linux-x86_64.tar.gz";
21 hash = "sha256-I8UF2rzIKfpcrxyvDa4AReWDIHOKTCj3ERaWhG1xGG0=";
24 url = "https://storage.googleapis.com/caido-releases/v${version}/caido-desktop-v${version}-linux-x86_64.AppImage";
25 hash = "sha256-KYQck2+YYPLJN3L6qchacjyVyyXR3nmJDTX5GPB4WvI=";
27 appimageContents = appimageTools.extractType2 {
28 inherit pname version;
32 wrappedDesktop = appimageTools.wrapType2 {
34 inherit pname version;
36 extraPkgs = pkgs: [ pkgs.libthai ];
38 extraInstallCommands = ''
39 install -m 444 -D ${appimageContents}/caido.desktop -t $out/share/applications
40 install -m 444 -D ${appimageContents}/caido.png \
41 $out/share/icons/hicolor/512x512/apps/caido.png
42 source "${makeWrapper}/nix-support/setup-hook"
43 wrapProgram $out/bin/caido \
44 --set WEBKIT_DISABLE_COMPOSITING_MODE 1
48 wrappedCli = stdenv.mkDerivation {
50 inherit pname version;
52 nativeBuildInputs = [ autoPatchelfHook ];
54 buildInputs = [ libgcc ];
60 install -m755 -D caido-cli $out/bin/caido-cli
65 description = "Lightweight web security auditing toolkit";
66 homepage = "https://caido.io/";
67 changelog = "https://github.com/caido/caido/releases/tag/v${version}";
68 license = lib.licenses.unfree;
69 maintainers = with lib.maintainers; [
73 platforms = [ "x86_64-linux" ];
77 lib.checkListOfEnum "${pname}: appVariants" appVariantList appVariants (
78 if appVariants == [ "desktop" ] then
80 else if appVariants == [ "cli" ] then
84 inherit pname version meta;
88 ln -s ${wrappedDesktop}/bin/caido $out/bin/caido
89 ln -s ${wrappedCli}/bin/caido-cli $out/bin/caido-cli