mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
glib: use absolute path for gio-launch-desktop
glib tries to look up `gio-launch-desktop` in the path which obviously can fail. Specifically this now happens when launching gnome-shell.
This commit is contained in:
parent
9d8ea55e30
commit
38c529f57a
2 changed files with 25 additions and 1 deletions
|
@ -59,7 +59,11 @@ stdenv.mkDerivation rec {
|
|||
++ optionals stdenv.hostPlatform.isMusl [
|
||||
./quark_init_on_demand.patch
|
||||
./gobject_init_on_demand.patch
|
||||
] ++ [ ./schema-override-variable.patch ];
|
||||
] ++ [
|
||||
./schema-override-variable.patch
|
||||
# Require substituteInPlace in postPatch
|
||||
./fix-gio-launch-desktop-path.patch
|
||||
];
|
||||
|
||||
outputs = [ "bin" "out" "dev" "devdoc" ];
|
||||
outputBin = "dev";
|
||||
|
@ -88,6 +92,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postPatch = ''
|
||||
substituteInPlace meson.build --replace "install_dir : 'bin'," "install_dir : glib_bindir,"
|
||||
|
||||
# substitute fix-gio-launch-desktop-path.patch
|
||||
substituteInPlace gio/gdesktopappinfo.c --replace "@bindir@" "$out/bin"
|
||||
|
||||
chmod +x gio/tests/gengiotypefuncs.py
|
||||
patchShebangs gio/tests/gengiotypefuncs.py
|
||||
patchShebangs glib/gen-unicode-tables.pl
|
||||
|
@ -106,6 +114,11 @@ stdenv.mkDerivation rec {
|
|||
mv "$dev/bin/$app" "$bin/bin"
|
||||
done
|
||||
|
||||
# Add gio-launch-desktop to $out so we can refer to it from $dev
|
||||
mkdir $out/bin
|
||||
mv "$dev/bin/gio-launch-desktop" "$out/bin/"
|
||||
ln -s "$out/bin/gio-launch-desktop" "$bin/bin/"
|
||||
|
||||
moveToOutput "share/glib-2.0" "$dev"
|
||||
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
|
||||
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- a/gio/gdesktopappinfo.c
|
||||
+++ b/gio/gdesktopappinfo.c
|
||||
@@ -2725,7 +2725,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
|
||||
|
||||
/* Fall back on usual searching in $PATH */
|
||||
if (tmp == NULL)
|
||||
- tmp = "gio-launch-desktop";
|
||||
+ tmp = "@bindir@/gio-launch-desktop";
|
||||
g_once_init_leave (&gio_launch_desktop_path, tmp);
|
||||
}
|
||||
|
Loading…
Reference in a new issue