nixpkgs/pkgs/by-name/ki/kiwitalk/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

95 lines
2.2 KiB
Nix

{ lib
, fetchFromGitHub
, copyDesktopItems
, stdenv
, rustc
, rustPlatform
, cargo
, cargo-tauri
, openssl
, libayatana-appindicator
, webkitgtk
, pkg-config
, makeDesktopItem
, pnpm
, nodejs
}:
stdenv.mkDerivation (finalAttrs: {
pname = "kiwitalk";
version = "0.5.1";
src = fetchFromGitHub {
owner = "KiwiTalk";
repo = "KiwiTalk";
rev = "v${finalAttrs.version}";
hash = "sha256-Th8q+Zbc102fIk2v7O3OOeSriUV/ydz60QwxzmS7AY8=";
};
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
'';
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-gf3vmKUta8KksUOxyhQS4UO6ycAJDfEicyXVGMW8+4c=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"tauri-plugin-log-0.0.0" = "sha256-8BrFf7vheMJIaZD0oXpi8V4hmUJFzHJmkcRtPL1/J48=";
"tauri-plugin-single-instance-0.0.0" = "sha256-8BrFf7vheMJIaZD0oXpi8V4hmUJFzHJmkcRtPL1/J48=";
};
};
nativeBuildInputs = [
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri
nodejs
pnpm.configHook
copyDesktopItems
pkg-config
];
buildInputs = [
openssl
libayatana-appindicator
webkitgtk
];
preBuild = ''
cargo tauri build -b deb
'';
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";
maintainers = with maintainers; [ honnip ];
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "kiwi-talk";
};
})