app2unit: fix missing runtime dependency

The runtime dependency of xdg-terminal-exec is missing from app2unit.
This commit replaces `xdg-terminal-exec` with the nix store path of the xdg-terminal-exec executable. This makes it possible to run terminal applications with app2unit without having to install xdg-terminal-exec as well.
This commit is contained in:
Alice ✨🌙 Luna
2026-01-23 22:53:01 +01:00
parent b5b5ff7558
commit 486e25b9a4

View File

@@ -2,6 +2,7 @@
lib,
stdenvNoCC,
dash,
xdg-terminal-exec,
scdoc,
fetchFromGitHub,
nix-update-script,
@@ -48,7 +49,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
dontPatchShebangs = true;
postFixup = ''
substituteInPlace $out/bin/app2unit \
--replace-fail '#!/bin/sh' '#!${lib.getExe dash}'
--replace-fail '#!/bin/sh' '#!${lib.getExe dash}' \
--replace-fail 'A2U__TERMINAL_HANDLER=xdg-terminal-exec' \
'A2U__TERMINAL_HANDLER=${lib.getExe xdg-terminal-exec}'
'';
meta = {