about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
index 2dbe74d3b34e..9777dca11c59 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
@@ -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
   ];
 
@@ -67,7 +77,7 @@ rustPlatform.buildRustPackage rec {
   meta = with lib; {
     description = "Yet another matrix client for desktop";
     homepage = "https://github.com/cinnyapp/cinny-desktop";
-    maintainers = [ maintainers.aveltras ];
+    maintainers = [ ];
     license = licenses.agpl3Only;
     platforms = platforms.linux;
     mainProgram = "cinny";