tsukimi: 0.12.2 -> 0.16.7, add nix-update-script (#352587)

This commit is contained in:
Aleksana 2024-11-01 10:46:56 +08:00 committed by GitHub
commit b065c9497a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,26 +11,26 @@
libepoxy, libepoxy,
wrapGAppsHook4, wrapGAppsHook4,
makeDesktopItem, makeDesktopItem,
copyDesktopItems,
stdenv, stdenv,
nix-update-script,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "tsukimi"; pname = "tsukimi";
version = "0.12.2"; version = "0.16.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tsukinaha"; owner = "tsukinaha";
repo = "tsukimi"; repo = "tsukimi";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-pJ+SUNGQS/kqBdOg21GgDeZThcjnB0FhgG00qLfqxYA="; hash = "sha256-OsdwjmvmVh8lVDy6KWlXe1+9e/EOzQ/auUwaoVHrksI=";
fetchSubmodules = true;
}; };
cargoHash = "sha256-PCJiSyfEgK8inzoRmRvnAU50kLnyVhNrgLrwtBUFpIU="; cargoHash = "sha256-Su7ACU+n90ZkhPUKod/zb2I6bKce/ST+u2Kz3Dg6ogo=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
wrapGAppsHook4 wrapGAppsHook4
copyDesktopItems
]; ];
buildInputs = buildInputs =
@ -52,18 +52,6 @@ rustPlatform.buildRustPackage rec {
doCheck = false; # tests require networking doCheck = false; # tests require networking
desktopItems = [
(makeDesktopItem {
name = "Tsukimi";
exec = "tsukimi";
type = "Application";
icon = "tsukimi";
categories = [ "AudioVideo" ];
startupWMClass = "moe.tsuna.tsukimi";
desktopName = "Tsukimi";
})
];
postPatch = '' postPatch = ''
substituteInPlace build.rs \ substituteInPlace build.rs \
--replace-fail 'i18n/locale' "$out/share/locale" --replace-fail 'i18n/locale' "$out/share/locale"
@ -73,12 +61,16 @@ rustPlatform.buildRustPackage rec {
''; '';
postInstall = '' postInstall = ''
install -Dm644 moe.tsuna.tsukimi.gschema.xml -t $out/share/glib-2.0/schemas install -Dm644 resources/moe.tsuna.tsukimi.gschema.xml -t $out/share/glib-2.0/schemas
glib-compile-schemas $out/share/glib-2.0/schemas glib-compile-schemas $out/share/glib-2.0/schemas
install -Dm644 resources/ui/icons/tsukimi.png -t $out/share/pixmaps install -Dm644 resources/icons/tsukimi.png -t $out/share/pixmaps
install -Dm644 resources/moe.tsuna.tsukimi.desktop.in $out/share/applications/moe.tsuna.tsukimi.desktop
''; '';
passthru.updateScript = nix-update-script { };
meta = { meta = {
description = "Simple third-party Emby client, featured with GTK4-RS, MPV and GStreamer"; description = "Simple third-party Emby client, featured with GTK4-RS, MPV and GStreamer";
homepage = "https://github.com/tsukinaha/tsukimi"; homepage = "https://github.com/tsukinaha/tsukimi";