2018-07-23 18:52:28 +02:00
|
|
|
{ fetchurl, stdenv, substituteAll, meson, ninja, pkgconfig, gnome3, glib, gtk, gsettings-desktop-schemas
|
2018-03-15 13:24:46 +01:00
|
|
|
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412
|
|
|
|
, libxslt, gettext, makeWrapper, systemd, xorg, epoxy }:
|
2016-09-18 21:35:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-02-25 21:07:20 +01:00
|
|
|
name = "gnome-session-${version}";
|
2018-04-13 23:52:39 +02:00
|
|
|
version = "3.28.1";
|
2018-02-25 21:07:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/gnome-session/${gnome3.versionBranch version}/${name}.tar.xz";
|
2018-04-13 23:52:39 +02:00
|
|
|
sha256 = "14nmbirgrp2nm16khbz109saqdlinlbrlhjnbjydpnrlimfgg4xq";
|
2018-02-25 21:07:20 +01:00
|
|
|
};
|
|
|
|
|
2018-07-23 18:52:28 +02:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-03-15 13:24:46 +01:00
|
|
|
mesonFlags = [ "-Dsystemd=true" ];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2018-03-15 13:24:46 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson ninja pkgconfig gettext makeWrapper
|
|
|
|
xmlto libxslt docbook_xsl docbook_xml_dtd_412
|
|
|
|
dbus # for DTD
|
|
|
|
];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2018-03-15 13:24:46 +01:00
|
|
|
buildInputs = [
|
|
|
|
glib gtk libICE gnome-desktop json-glib xorg.xtrans gnome3.defaultIconTheme
|
|
|
|
gnome3.gnome-settings-daemon gsettings-desktop-schemas systemd epoxy
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson_post_install.py # patchShebangs requires executable file
|
|
|
|
patchShebangs meson_post_install.py
|
|
|
|
'';
|
2016-09-18 21:35:23 +02:00
|
|
|
|
|
|
|
preFixup = ''
|
2016-10-03 00:09:28 +02:00
|
|
|
for desktopFile in $(grep -rl "Exec=gnome-session" $out/share)
|
|
|
|
do
|
|
|
|
echo "Patching gnome-session path in: $desktopFile"
|
2018-07-23 18:52:28 +02:00
|
|
|
sed -i "s,Exec=gnome-session,Exec=$out/bin/gnome-session," $desktopFile
|
2016-10-03 00:09:28 +02:00
|
|
|
done
|
2016-09-18 21:35:23 +02:00
|
|
|
wrapProgram "$out/bin/gnome-session" \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
2016-10-02 18:38:12 +02:00
|
|
|
--suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
2018-03-15 13:24:46 +01:00
|
|
|
--suffix XDG_DATA_DIRS : "${gnome3.gnome-shell}/share"\
|
2018-02-25 03:23:58 +01:00
|
|
|
--suffix XDG_CONFIG_DIRS : "${gnome3.gnome-settings-daemon}/etc/xdg"
|
2016-09-18 21:35:23 +02:00
|
|
|
'';
|
|
|
|
|
2018-03-15 13:24:46 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = "gnome-session";
|
|
|
|
attrPath = "gnome3.gnome-session";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-09-18 21:35:23 +02:00
|
|
|
meta = with stdenv.lib; {
|
2018-03-15 13:24:46 +01:00
|
|
|
description = "GNOME session manager";
|
|
|
|
homepage = https://wiki.gnome.org/Projects/SessionManagement;
|
|
|
|
license = licenses.gpl2Plus;
|
2016-09-18 21:35:23 +02:00
|
|
|
maintainers = gnome3.maintainers;
|
2018-03-15 13:24:46 +01:00
|
|
|
platforms = platforms.linux;
|
2016-09-18 21:35:23 +02:00
|
|
|
};
|
|
|
|
}
|