2019-02-13 21:47:50 +00:00
|
|
|
{ fetchurl, stdenv, substituteAll, meson, ninja, pkgconfig, gnome3, glib, gtk3, gsettings-desktop-schemas
|
2018-09-03 21:06:42 +01:00
|
|
|
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412, python3
|
2019-10-07 10:45:31 +01:00
|
|
|
, libxslt, gettext, makeWrapper, systemd, xorg, epoxy, gnugrep, bash }:
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gnome-session";
|
2020-02-09 00:37:00 +00:00
|
|
|
version = "3.36.0";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
2020-01-05 13:43:39 +00:00
|
|
|
outputs = ["out" "sessions"];
|
|
|
|
|
2018-02-25 20:07:20 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://gnome/sources/gnome-session/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-02-09 00:37:00 +00:00
|
|
|
sha256 = "0ymvf1bap35348rpjqp63qwnwnnawdwi4snch95zc4n832w3hjym";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2018-07-23 17:52:28 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
2018-10-03 19:58:58 +01:00
|
|
|
gsettings = "${glib.bin}/bin/gsettings";
|
2018-07-23 17:52:28 +01:00
|
|
|
dbusLaunch = "${dbus.lib}/bin/dbus-launch";
|
2018-08-04 14:17:32 +01:00
|
|
|
grep = "${gnugrep}/bin/grep";
|
|
|
|
bash = "${bash}/bin/bash";
|
2018-07-23 17:52:28 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-03-15 12:24:46 +00:00
|
|
|
mesonFlags = [ "-Dsystemd=true" ];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2018-03-15 12:24:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson ninja pkgconfig gettext makeWrapper
|
2018-09-03 21:06:42 +01:00
|
|
|
xmlto libxslt docbook_xsl docbook_xml_dtd_412 python3
|
2018-03-15 12:24:46 +00:00
|
|
|
dbus # for DTD
|
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2018-03-15 12:24:46 +00:00
|
|
|
buildInputs = [
|
2019-02-13 21:47:50 +00:00
|
|
|
glib gtk3 libICE gnome-desktop json-glib xorg.xtrans gnome3.adwaita-icon-theme
|
2018-03-15 12:24:46 +00:00
|
|
|
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 20:35:23 +01:00
|
|
|
|
2018-08-04 14:17:32 +01:00
|
|
|
# `bin/gnome-session` will reset the environment when run in wayland, we
|
|
|
|
# therefor wrap `libexec/gnome-session-binary` instead which is the actual
|
|
|
|
# binary needing wrapping
|
2016-09-18 20:35:23 +01:00
|
|
|
preFixup = ''
|
2018-08-04 14:17:32 +01:00
|
|
|
wrapProgram "$out/libexec/gnome-session-binary" \
|
2016-09-18 20:35:23 +01:00
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
2016-10-02 17:38:12 +01:00
|
|
|
--suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
2018-03-15 12:24:46 +00:00
|
|
|
--suffix XDG_DATA_DIRS : "${gnome3.gnome-shell}/share"\
|
2018-02-25 02:23:58 +00:00
|
|
|
--suffix XDG_CONFIG_DIRS : "${gnome3.gnome-settings-daemon}/etc/xdg"
|
2016-09-18 20:35:23 +01:00
|
|
|
'';
|
|
|
|
|
2020-01-05 13:43:39 +00:00
|
|
|
# We move the GNOME sessions to another output since gnome-session is a dependency of
|
|
|
|
# GDM itself. If we do not hide them, it will show broken GNOME sessions when GDM is
|
|
|
|
# enabled without proper GNOME installation.
|
|
|
|
postInstall = ''
|
|
|
|
mkdir $sessions
|
|
|
|
moveToOutput share/wayland-sessions "$sessions"
|
|
|
|
moveToOutput share/xsessions "$sessions"
|
|
|
|
'';
|
|
|
|
|
2018-03-15 12:24:46 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = "gnome-session";
|
|
|
|
attrPath = "gnome3.gnome-session";
|
|
|
|
};
|
2019-01-12 07:33:05 +00:00
|
|
|
providedSessions = [ "gnome" "gnome-xorg" ];
|
2018-03-15 12:24:46 +00:00
|
|
|
};
|
|
|
|
|
2016-09-18 20:35:23 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-03-15 12:24:46 +00:00
|
|
|
description = "GNOME session manager";
|
|
|
|
homepage = https://wiki.gnome.org/Projects/SessionManagement;
|
|
|
|
license = licenses.gpl2Plus;
|
2016-09-18 20:35:23 +01:00
|
|
|
maintainers = gnome3.maintainers;
|
2018-03-15 12:24:46 +00:00
|
|
|
platforms = platforms.linux;
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
|
|
|
}
|