cinny-desktop: 2.2.6 -> 3.1.0

This also ensures the version of cinny-desktop matches cinny,
the alternative would be to override the version of cinny.
This commit is contained in:
Peder Bergebakken Sundt 2023-10-27 17:30:26 +02:00
parent 3fa605f00e
commit 6491d6602e
2 changed files with 3675 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,28 +9,37 @@
, dbus
, glib
, glib-networking
, libayatana-appindicator
, webkitgtk
, makeDesktopItem
}:
rustPlatform.buildRustPackage rec {
pname = "cinny-desktop";
version = "2.2.6";
version = "3.1.0";
src = fetchFromGitHub {
owner = "cinnyapp";
repo = "cinny-desktop";
rev = "v${version}";
hash = "sha256-RW6LeItIAHJk1e7qMa1MLIGb3jHvJ/KM8E9l1qR48w8=";
hash = "sha256-v5D0/EHVQ2xo7TGo+jZoRDBVFczkaZu2ka6QpwV4dpw=";
};
sourceRoot = "${src.name}/src-tauri";
cargoHash = "sha256-Iab/icQ9hFVh/o6egZVPa2zeKgO5WxzkluhRckcayvw=";
# modififying $cargoDepsCopy requires the lock to be vendored
cargoLock.lockFile = ./Cargo.lock;
postPatch = ''
postPatch = let
cinny' =
assert lib.assertMsg (cinny.version == version) "cinny.version (${cinny.version}) != cinny-desktop.version (${version})";
cinny;
in ''
substituteInPlace tauri.conf.json \
--replace '"distDir": "../cinny/dist",' '"distDir": "${cinny}",'
--replace '"distDir": "../cinny/dist",' '"distDir": "${cinny'}",'
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
'';
postInstall = ''
@ -50,6 +59,7 @@ rustPlatform.buildRustPackage rec {
dbus
glib
glib-networking
libayatana-appindicator
webkitgtk
];