diff options
| author | Jan Tojnar <jtojnar@gmail.com> | 2023-08-07 20:30:21 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-08-11 20:15:55 +0000 |
| commit | 2b201534b60873571c7535d780206c98617eb151 (patch) | |
| tree | 9c0fd5ecf25d550172f3862367e2aa948cb5e791 | |
| parent | Merge pull request #248550 from NixOS/backport-248549-to-release-23.05 (diff) | |
| download | nixpkgs-origin/backport-247790-to-release-23.05.tar.gz | |
gnome.gnome-shell: Provide schema compiler pathorigin/backport-247790-to-release-23.05
This is required for installing extensions containing schemas since GNOME 44:
> Error while installing just-perfection-desktop@just-perfection: Failed to execute child process “glib-compile-schemas” (No such file or directory)
While at it, also unify the other patched paths.
This adds `glib.dev` to the GNOME Shell runtime closure but it is just 20 MiB increase to 1.9 GiB.
(cherry picked from commit 7fddcb7d414e6f0cd8d214408fd1b95f713e4925)
| -rw-r--r-- | pkgs/desktops/gnome/core/gnome-shell/default.nix | 4 | ||||
| -rw-r--r-- | pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch | 51 |
2 files changed, 46 insertions, 9 deletions
diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix index 528f44ae66d5..4c069c20ab11 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; |
