kiwitalk: use cargo-tauri.hook

This commit is contained in:
seth
2024-09-30 20:13:15 -04:00
parent 4f58959149
commit 83edf5a626
+8 -24
View File
@@ -1,16 +1,15 @@
{ lib
, fetchFromGitHub
, copyDesktopItems
, stdenv
, rustc
, rustPlatform
, cargo
, cargo-tauri
, desktop-file-utils
, openssl
, libayatana-appindicator
, webkitgtk
, pkg-config
, makeDesktopItem
, pnpm
, nodejs
}:
@@ -49,10 +48,10 @@ stdenv.mkDerivation (finalAttrs: {
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri
cargo-tauri.hook
desktop-file-utils
nodejs
pnpm.configHook
copyDesktopItems
pkg-config
];
@@ -62,28 +61,13 @@ stdenv.mkDerivation (finalAttrs: {
webkitgtk
];
preBuild = ''
cargo tauri build -b deb
postInstall = lib.optionalString stdenv.isLinux ''
desktop-file-edit \
--set-comment "An UNOFFICIAL cross-platform KakaoTalk client" \
--set-key="Categories" --set-value="Network;InstantMessaging;" \
$out/share/applications/kiwi-talk.desktop
'';
preInstall = ''
mv target/release/bundle/deb/*/data/usr/ $out
# delete the generated desktop entry
rm -r $out/share/applications
'';
desktopItems = [
(makeDesktopItem {
name = "KiwiTalk";
exec = "kiwi-talk";
icon = "kiwi-talk";
desktopName = "KiwiTalk";
comment = "An UNOFFICIAL cross-platform KakaoTalk client";
categories = [ "Network" "InstantMessaging" ];
terminal = false;
})
];
meta = with lib; {
description = "UNOFFICIAL cross-platform KakaoTalk client written in TypeScript & Rust (SolidJS, tauri)";
homepage = "https://github.com/KiwiTalk/KiwiTalk";