diff --git a/pkgs/desktops/gnome-3/core/gnome-session/default.nix b/pkgs/desktops/gnome-3/core/gnome-session/default.nix index 7b407aad5068..1882f19bb223 100644 --- a/pkgs/desktops/gnome-3/core/gnome-session/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-session/default.nix @@ -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"\ diff --git a/pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch b/pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch new file mode 100644 index 000000000000..3c56fd730e44 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch @@ -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,