desktop-client: fix desktop file exec_path for Nix build

master
Felix Stupp 5 months ago
parent f751d7109b
commit 2876e19612
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -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]] = {

@ -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 = {

Loading…
Cancel
Save