xdg-terminal-exec: fix bad interaction with TERMINAL

This commit is contained in:
Colin 2024-03-23 09:28:26 +00:00
parent d129ae2c03
commit c404c8b2ae

View File

@ -1,9 +1,16 @@
{ pkgs, ... }:
{
sane.programs.xdg-terminal-exec = {
# give the package a .desktop item.
# this way anyone can launch a terminal via the xdg-desktop-portal.
packageUnwrapped = pkgs.xdg-terminal-exec.overrideAttrs (upstream: {
# fix for <https://github.com/Vladimir-csp/xdg-terminal-exec/issues/50>
postPatch = (upstream.postPatch or "") + ''
sed '2i\
unset TERMINAL\
' -i xdg-terminal-exec
'';
# give the package a .desktop item.
# this way anyone can launch a terminal via the xdg-desktop-portal.
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
pkgs.copyDesktopItems
];