From 2876e19612f2d67750c3cab3392cf5d4fe5c69b1 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 29 Jun 2025 20:07:58 +0000 Subject: [PATCH] desktop-client: fix desktop file exec_path for Nix build --- desktop-client/app.py | 3 ++- desktop-client/package.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop-client/app.py b/desktop-client/app.py index 81f67bf..41fe9e2 100755 --- a/desktop-client/app.py +++ b/desktop-client/app.py @@ -74,7 +74,8 @@ def misc_generate_desktop() -> None: template_path = os.getenv("STREAMLINED_DESKTOP_TEMPLATE") or "./entry.desktop" with Path(template_path).open("r") as fh: temp = Template(fh.read()) - print(temp.substitute(name="Entertainment Decider", exec_path=str(Path(__file__).resolve()))) + exec_path = os.getenv("STREAMLINED_EXEC_PATH") or str(Path(__file__).resolve()) + print(temp.substitute(name="Entertainment Decider", exec_path=exec_path)) MISC_COMMANDS: Dict[str, Callable[..., None]] = { diff --git a/desktop-client/package.nix b/desktop-client/package.nix index b64f5b1..09f61ed 100644 --- a/desktop-client/package.nix +++ b/desktop-client/package.nix @@ -41,7 +41,7 @@ python3Packages.buildPythonPackage { postInstall = '' mkdir --parent $out/share/applications - STREAMLINED_DESKTOP_TEMPLATE=${./entry.desktop} $out/bin/${name} misc generate-desktop-file > $out/share/applications/${name}_uri.desktop + STREAMLINED_DESKTOP_TEMPLATE=${./entry.desktop} STREAMLINED_EXEC_PATH=$out/bin/${name} $out/bin/${name} misc generate-desktop-file > $out/share/applications/${name}_uri.desktop ''; meta = {