vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / by-name / ki / kiwitalk / package.nix
blob74639a6fbb509587e2b646ae6fc52a326fe4f8da
1 { lib
2 , fetchFromGitHub
3 , stdenv
4 , rustc
5 , rustPlatform
6 , cargo
7 , cargo-tauri
8 , desktop-file-utils
9 , openssl
10 , libayatana-appindicator
11 , webkitgtk_4_0
12 , pkg-config
13 , pnpm
14 , nodejs
17 stdenv.mkDerivation (finalAttrs: {
18   pname = "kiwitalk";
19   version = "0.5.1";
21   src = fetchFromGitHub {
22     owner = "KiwiTalk";
23     repo = "KiwiTalk";
24     rev = "v${finalAttrs.version}";
25     hash = "sha256-Th8q+Zbc102fIk2v7O3OOeSriUV/ydz60QwxzmS7AY8=";
26   };
28   postPatch = ''
29     substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
30       --replace-warn "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
31     ln -sf ${./Cargo.lock} Cargo.lock
32   '';
34   pnpmDeps = pnpm.fetchDeps {
35     inherit (finalAttrs) pname version src;
36     hash = "sha256-gf3vmKUta8KksUOxyhQS4UO6ycAJDfEicyXVGMW8+4c=";
37   };
39   cargoDeps = rustPlatform.importCargoLock {
40     lockFile = ./Cargo.lock;
41     outputHashes = {
42       "tauri-plugin-log-0.0.0" = "sha256-8BrFf7vheMJIaZD0oXpi8V4hmUJFzHJmkcRtPL1/J48=";
43       "tauri-plugin-single-instance-0.0.0" = "sha256-8BrFf7vheMJIaZD0oXpi8V4hmUJFzHJmkcRtPL1/J48=";
44     };
45   };
47   nativeBuildInputs = [
48     rustPlatform.cargoSetupHook
49     cargo
50     rustc
51     cargo-tauri.hook
52     desktop-file-utils
53     nodejs
54     pnpm.configHook
55     pkg-config
56   ];
58   buildInputs = [
59     openssl
60     libayatana-appindicator
61     webkitgtk_4_0
62   ];
64   postInstall = lib.optionalString stdenv.isLinux ''
65     desktop-file-edit \
66       --set-comment "An UNOFFICIAL cross-platform KakaoTalk client" \
67       --set-key="Categories" --set-value="Network;InstantMessaging;" \
68       $out/share/applications/kiwi-talk.desktop
69   '';
71   meta = with lib; {
72     description = "UNOFFICIAL cross-platform KakaoTalk client written in TypeScript & Rust (SolidJS, tauri)";
73     homepage = "https://github.com/KiwiTalk/KiwiTalk";
74     maintainers = with maintainers; [ honnip ];
75     license = licenses.asl20;
76     platforms = platforms.linux ++ platforms.darwin;
77     mainProgram = "kiwi-talk";
78   };