diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2023-08-07 20:30:21 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2023-08-11 22:15:28 +0200 |
commit | 52fbc287ca19be766fa4e9db4f5d46bc51d11c32 (patch) | |
tree | 8172ad8e326fafe0b6d39dbb3f5bed5ec8eee9a0 /pkgs/desktops/gnome/core/gnome-shell | |
parent | 0a088cacf85bb884717f42d28233deb2dd05d042 (diff) |
gnome.gnome-shell: Provide schema compiler path
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.
Diffstat (limited to 'pkgs/desktops/gnome/core/gnome-shell')
-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 5c49914cdf024..dfc986f06b6a6 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 8b35736ecfcd6..e70c4851e9d59 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; |