From ca0b2cdd6774635150fedcca009fee8a18df1dcb Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 28 Mar 2022 13:57:42 +0200 Subject: [PATCH] =?UTF-8?q?glib:=20add=20support=20for=20Pantheon=E2=80=99?= =?UTF-8?q?s=20terminal=20emulator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just like we did for GNOME’s in the parent commit. --- pkgs/development/libraries/glib/default.nix | 2 ++ .../glib/elementary-terminal-support.patch | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/development/libraries/glib/elementary-terminal-support.patch diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index f2b6df3c855a..22023fdded49 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -72,6 +72,8 @@ stdenv.mkDerivation rec { # Add support for the GNOME’s default terminal emulator. # https://gitlab.gnome.org/GNOME/glib/-/issues/2618 ./gnome-console-support.patch + # Do the same for Pantheon’s terminal emulator. + ./elementary-terminal-support.patch # GLib contains many binaries used for different purposes; # we will install them to different outputs: diff --git a/pkgs/development/libraries/glib/elementary-terminal-support.patch b/pkgs/development/libraries/glib/elementary-terminal-support.patch new file mode 100644 index 000000000000..0b8c8a70871c --- /dev/null +++ b/pkgs/development/libraries/glib/elementary-terminal-support.patch @@ -0,0 +1,16 @@ +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index a441bfec9..6bcd3e690 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -2678,6 +2678,11 @@ prepend_terminal_to_vector (int *argc, + if (check != NULL) + pass_cmd_as_single_arg = TRUE; + } ++ if (check == NULL) { ++ check = g_find_program_in_path ("io.elementary.terminal"); ++ if (check != NULL) ++ pass_cmd_as_single_arg = TRUE; ++ } + if (check == NULL) + check = g_find_program_in_path ("tilix"); + if (check == NULL)