diff --git a/pkgs/by-name/an/anytype/0001-fix-single-instance-detection-when-not-packaged.patch b/pkgs/by-name/an/anytype/0001-fix-single-instance-detection-when-not-packaged.patch new file mode 100644 index 000000000000..6e09070d72eb --- /dev/null +++ b/pkgs/by-name/an/anytype/0001-fix-single-instance-detection-when-not-packaged.patch @@ -0,0 +1,25 @@ +From 0622b4b5497d8bd923eb0d6dd3f917dfcbda9d53 Mon Sep 17 00:00:00 2001 +From: Axel Karjalainen +Date: Thu, 22 May 2025 22:38:14 +0300 +Subject: [PATCH] fix: single instance detection when not packaged + +--- + electron.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/electron.js b/electron.js +index d70f20f..158bb93 100644 +--- a/electron.js ++++ b/electron.js +@@ -76,7 +76,7 @@ if (is.development && !port) { + return; + }; + +-if (app.isPackaged && !app.requestSingleInstanceLock()) { ++if (!is.development && !app.requestSingleInstanceLock()) { + Api.exit(mainWindow, '' ,false); + return; + }; +-- +2.49.0 + diff --git a/pkgs/by-name/an/anytype/package.nix b/pkgs/by-name/an/anytype/package.nix index 98d1511c80f9..d59a40637481 100644 --- a/pkgs/by-name/an/anytype/package.nix +++ b/pkgs/by-name/an/anytype/package.nix @@ -52,6 +52,7 @@ buildNpmPackage { patches = [ ./0001-feat-update-Disable-auto-checking-for-updates-and-updating-manually.patch + ./0001-fix-single-instance-detection-when-not-packaged.patch ]; buildPhase = '' @@ -101,7 +102,7 @@ buildNpmPackage { desktopItems = [ (makeDesktopItem { name = "anytype"; - exec = "anytype"; + exec = "anytype %U"; icon = "anytype"; desktopName = "Anytype"; comment = description;