diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix index 5c49914cdf02..dfc986f06b6a 100644 --- a/pkgs/desktops/gnome/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome/core/gnome-shell/default.nix @@ -80,8 +80,10 @@ stdenv.mkDerivation rec { # Hardcode paths to various dependencies so that they can be found at runtime. (substituteAll { src = ./fix-paths.patch; - inherit libgnomekbd unzip; + gkbd_keyboard_display = "${lib.getBin libgnomekbd}/bin/gkbd-keyboard-display"; + glib_compile_schemas = "${glib.dev}/bin/glib-compile-schemas"; gsettings = "${glib.bin}/bin/gsettings"; + unzip = "${lib.getBin unzip}/bin/unzip"; }) # Use absolute path for libshew installation to make our patched gobject-introspection diff --git a/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch b/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch index 8b35736ecfcd..e70c4851e9d5 100644 --- a/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch +++ b/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch @@ -10,27 +10,62 @@ index de91167c5..1c9965678 100644 +ExecStart=@gsettings@ set org.gnome.shell disable-user-extensions true Restart=no diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js -index 8bf4646a6..59e88bb4c 100644 +index 197cc1c1c..dd74aa167 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js -@@ -114,7 +114,7 @@ async function extractExtensionArchive(bytes, dir) { +@@ -110,7 +110,7 @@ async function extractExtensionArchive(bytes, dir) { stream.close_async(GLib.PRIORITY_DEFAULT, null); const unzip = Gio.Subprocess.new( - ['unzip', '-uod', dir.get_path(), '--', file.get_path()], -+ ['@unzip@/bin/unzip', '-uod', dir.get_path(), '--', file.get_path()], ++ ['@unzip@', '-uod', dir.get_path(), '--', file.get_path()], Gio.SubprocessFlags.NONE); await unzip.wait_check_async(null); - } + +@@ -132,7 +132,7 @@ async function extractExtensionArchive(bytes, dir) { + } + + const compileSchema = Gio.Subprocess.new( +- ['glib-compile-schemas', '--strict', schemasPath.get_path()], ++ ['@glib_compile_schemas@', '--strict', schemasPath.get_path()], + Gio.SubprocessFlags.NONE); + + try { diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index bc50f3d37..868eb5abf 100644 +index fff4e73c2..92859b099 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js -@@ -1080,6 +1080,6 @@ class InputSourceIndicator extends PanelMenu.Button { +@@ -1092,6 +1092,6 @@ class InputSourceIndicator extends PanelMenu.Button { if (xkbVariant.length > 0) - description = '%s\t%s'.format(description, xkbVariant); + description = `${description}\t${xkbVariant}`; - Util.spawn(['gkbd-keyboard-display', '-l', description]); -+ Util.spawn(['@libgnomekbd@/bin/gkbd-keyboard-display', '-l', description]); ++ Util.spawn(['@gkbd_keyboard_display@', '-l', description]); } }); +diff --git a/subprojects/extensions-tool/src/command-install.c b/subprojects/extensions-tool/src/command-install.c +index 11fb4b6b7..e00e4807b 100644 +--- a/subprojects/extensions-tool/src/command-install.c ++++ b/subprojects/extensions-tool/src/command-install.c +@@ -158,7 +158,7 @@ install_extension (const char *bundle, + + schemapath = g_file_get_path (schemadir); + proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDERR_SILENCE, &error, +- "glib-compile-schemas", "--strict", schemapath, ++ "@glib_compile_schemas@", "--strict", schemapath, + NULL); + + if (!g_subprocess_wait_check (proc, NULL, &error)) +diff --git a/subprojects/extensions-tool/src/command-pack.c b/subprojects/extensions-tool/src/command-pack.c +index f2cfcd51a..2a9a7efdf 100644 +--- a/subprojects/extensions-tool/src/command-pack.c ++++ b/subprojects/extensions-tool/src/command-pack.c +@@ -168,7 +168,7 @@ extension_pack_add_schemas (ExtensionPack *pack, + #else + dstpath = g_file_get_path (dstdir); + proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDERR_SILENCE, error, +- "glib-compile-schemas", "--strict", dstpath, NULL); ++ "@glib_compile_schemas@", "--strict", dstpath, NULL); + + if (!g_subprocess_wait_check (proc, NULL, error)) + return FALSE;