20 url = "https://caido.download/releases/v${version}/caido-cli-v${version}-linux-x86_64.tar.gz";
21 hash = "sha256-6thdJf6UCzeKOgjPTkK4FsgbQ2u6Eu+tnHihXJPMEUQ=";
24 url = "https://caido.download/releases/v${version}/caido-desktop-v${version}-linux-x86_64.AppImage";
25 hash = "sha256-HEx+RFWF+qfFut5n1ZxKQHjSTGq5EbXAupPJ+5H5LQ0=";
27 appimageContents = appimageTools.extractType2 {
28 inherit pname version;
32 wrappedDesktop = appimageTools.wrapType2 {
34 inherit pname version;
36 nativeBuildInputs = [ makeWrapper ];
38 extraPkgs = pkgs: [ pkgs.libthai ];
40 extraInstallCommands = ''
41 install -m 444 -D ${appimageContents}/caido.desktop -t $out/share/applications
42 install -m 444 -D ${appimageContents}/caido.png \
43 $out/share/icons/hicolor/512x512/apps/caido.png
44 wrapProgram $out/bin/caido \
45 --set WEBKIT_DISABLE_COMPOSITING_MODE 1
49 wrappedCli = stdenv.mkDerivation {
51 inherit pname version;
53 nativeBuildInputs = [ autoPatchelfHook ];
55 buildInputs = [ libgcc ];
61 install -m755 -D caido-cli $out/bin/caido-cli
66 description = "Lightweight web security auditing toolkit";
67 homepage = "https://caido.io/";
68 changelog = "https://github.com/caido/caido/releases/tag/v${version}";
69 license = lib.licenses.unfree;
70 maintainers = with lib.maintainers; [
74 platforms = [ "x86_64-linux" ];
78 lib.checkListOfEnum "${pname}: appVariants" appVariantList appVariants (
79 if appVariants == [ "desktop" ] then
81 else if appVariants == [ "cli" ] then
85 inherit pname version meta;
89 ln -s ${wrappedDesktop}/bin/caido $out/bin/caido
90 ln -s ${wrappedCli}/bin/caido-cli $out/bin/caido-cli