nixpkgs/pkgs/desktops/gnome-3/core/gnome-session/default.nix

68 lines
2.2 KiB
Nix
Raw Normal View History

2019-02-13 21:47:50 +00:00
{ fetchurl, stdenv, substituteAll, meson, ninja, pkgconfig, gnome3, glib, gtk3, gsettings-desktop-schemas
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412, python3
, libxslt, gettext, makeWrapper, systemd, xorg, epoxy, gnugrep, bash }:
stdenv.mkDerivation rec {
pname = "gnome-session";
2019-03-03 18:25:58 +00:00
version = "3.32.0";
src = fetchurl {
url = "mirror://gnome/sources/gnome-session/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2019-03-03 18:25:58 +00:00
sha256 = "0zrzkpd406i159mla7bfs5npa32fgqh66aip1rfq02rgsgmc9m5v";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
gsettings = "${glib.bin}/bin/gsettings";
dbusLaunch = "${dbus.lib}/bin/dbus-launch";
grep = "${gnugrep}/bin/grep";
bash = "${bash}/bin/bash";
})
];
2018-03-15 12:24:46 +00:00
mesonFlags = [ "-Dsystemd=true" ];
2018-03-15 12:24:46 +00:00
nativeBuildInputs = [
meson ninja pkgconfig gettext makeWrapper
xmlto libxslt docbook_xsl docbook_xml_dtd_412 python3
2018-03-15 12:24:46 +00:00
dbus # for DTD
];
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
'';
# `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
preFixup = ''
wrapProgram "$out/libexec/gnome-session-binary" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--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"\
--suffix XDG_CONFIG_DIRS : "${gnome3.gnome-settings-daemon}/etc/xdg"
'';
2018-03-15 12:24:46 +00:00
passthru = {
updateScript = gnome3.updateScript {
packageName = "gnome-session";
attrPath = "gnome3.gnome-session";
};
};
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;
maintainers = gnome3.maintainers;
2018-03-15 12:24:46 +00:00
platforms = platforms.linux;
};
}