diff --git a/apps/electron/package.json b/apps/electron/package.json index 14c0bbc..590d97c 100644 --- a/apps/electron/package.json +++ b/apps/electron/package.json @@ -39,6 +39,7 @@ "build": { "appId": "net.tensamin.client", "productName": "Tensamin", + "executableName": "tensamin", "artifactName": "Tensamin-${version}-${os}-${arch}.${ext}", "directories": { "output": "release" @@ -55,8 +56,15 @@ ], "linux": { "target": ["AppImage", "deb", "rpm"], + "executableName": "tensamin", "category": "Network", - "maintainer": "methanium" + "maintainer": "Methanium", + "desktop": { + "entry": { + "Name": "Tensamin", + "StartupWMClass": "Tensamin" + } + } }, "win": { "target": ["nsis", "portable"] diff --git a/flake.nix b/flake.nix index 7f879c2..0ee94f1 100644 --- a/flake.nix +++ b/flake.nix @@ -12,24 +12,29 @@ packages = forAllSystems (system: let pkgs = import nixpkgs {inherit system;}; artifact = if system == "aarch64-linux" then "Tensamin-${version}-linux-arm64.AppImage" else "Tensamin-${version}-linux-x86_64.AppImage"; - - appImagePath = /. + builtins.getEnv "TENSAMIN_APPIMAGE"; - in { - default = pkgs.appimageTools.wrapType2 { - pname = "tensamin"; - inherit version; - src = pkgs.fetchurl { - url = "${forgejoBaseUrl}/${artifact}"; - hash = "sha256-bzAwsO/zHDVkBxADMJeR8L0/Cnj06RbBzUGYYrTouw4="; + appImagePath = /. + builtins.getEnv "TENSAMIN_APPIMAGE"; + desktopItem = pkgs.makeDesktopItem { + name = "tensamin"; + desktopName = "Tensamin"; + exec = "tensamin %U"; + icon = "tensamin"; + categories = ["Network"]; + }; + wrapAppImage = src: + pkgs.appimageTools.wrapType2 { + pname = "tensamin"; + inherit version src; + extraInstallCommands = '' + install -Dm444 ${desktopItem}/share/applications/tensamin.desktop $out/share/applications/tensamin.desktop + ''; }; - }; + in { + default = wrapAppImage (pkgs.fetchurl { + url = "${forgejoBaseUrl}/${artifact}"; + hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; + }); - localPathForDev = pkgs.appimageTools.wrapType2 { - pname = "tensamin"; - inherit version; - - src = appImagePath; - }; + localPathForDev = wrapAppImage appImagePath; }); }; } diff --git a/package.json b/package.json index 1840a7e..55353bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tensamin", - "version": "0.0.4", + "version": "0.0.5", "private": true, "workspaces": [ "packages/*",