gnome3.gnome-session: use absolute paths
TryExec needs absolute path too, otherwise the desktop file will be ignored unless gnome-session is in PATH, in which case, we would not need to patch Exec.
This commit is contained in:
parent
e6056c72d1
commit
adbe4e1c68
@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, meson, ninja, pkgconfig, gnome3, glib, gtk, gsettings-desktop-schemas
|
||||
{ fetchurl, stdenv, substituteAll, meson, ninja, pkgconfig, gnome3, glib, gtk, gsettings-desktop-schemas
|
||||
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412
|
||||
, libxslt, gettext, makeWrapper, systemd, xorg, epoxy }:
|
||||
|
||||
@ -11,6 +11,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "14nmbirgrp2nm16khbz109saqdlinlbrlhjnbjydpnrlimfgg4xq";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
# FIXME: glib binaries shouldn't be in .dev!
|
||||
gsettings = "${glib.dev}/bin/gsettings";
|
||||
dbusLaunch = "${dbus.lib}/bin/dbus-launch";
|
||||
})
|
||||
];
|
||||
|
||||
mesonFlags = [ "-Dsystemd=true" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -29,15 +38,13 @@ stdenv.mkDerivation rec {
|
||||
patchShebangs meson_post_install.py
|
||||
'';
|
||||
|
||||
# FIXME: glib binaries shouldn't be in .dev!
|
||||
preFixup = ''
|
||||
for desktopFile in $(grep -rl "Exec=gnome-session" $out/share)
|
||||
do
|
||||
echo "Patching gnome-session path in: $desktopFile"
|
||||
sed -i "s,^Exec=gnome-session,Exec=$out/bin/gnome-session," $desktopFile
|
||||
sed -i "s,Exec=gnome-session,Exec=$out/bin/gnome-session," $desktopFile
|
||||
done
|
||||
wrapProgram "$out/bin/gnome-session" \
|
||||
--prefix PATH : "${glib.dev}/bin" \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
||||
--suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--suffix XDG_DATA_DIRS : "${gnome3.gnome-shell}/share"\
|
||||
|
22
pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch
Normal file
22
pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/gnome-session/gnome-session.in
|
||||
+++ b/gnome-session/gnome-session.in
|
||||
@@ -13,7 +13,7 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
-SETTING=$(gsettings get org.gnome.system.locale region)
|
||||
+SETTING=$(@gsettings@ get org.gnome.system.locale region)
|
||||
REGION=${SETTING#\'}
|
||||
REGION=${REGION%\'}
|
||||
|
||||
--- a/gnome-session/main.c
|
||||
+++ b/gnome-session/main.c
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
new_argv[i + 2] = NULL;
|
||||
|
||||
- if (!execvp ("dbus-launch", new_argv)) {
|
||||
+ if (!execvp ("@dbusLaunch@", new_argv)) {
|
||||
g_set_error (error,
|
||||
G_SPAWN_ERROR,
|
||||
G_SPAWN_ERROR_FAILED,
|
Loading…
Reference in New Issue
Block a user