@@ -1,7 +1,7 @@
1−{ stdenv, fetchurl, pkgconfig, glib, itstool, libxml2, xorg, dbus
1+{ stdenv, fetchurl, substituteAll, pkgconfig, glib, itstool, libxml2, xorg, dbus
22, intltool, accountsservice, libX11, gnome3, systemd, autoreconfHook
33, gtk, libcanberra-gtk3, pam, libtool, gobjectIntrospection, plymouth
4−, librsvg, coreutils }:
4+, librsvg, coreutils, xwayland }:
55
66stdenv.mkDerivation rec {
77 name = "gdm-${version}";
@@ -12,50 +12,56 @@ stdenv.mkDerivation rec {
1212 sha256 = "1yxjjyrp0ywrc25cp81bsdhp79zn0c0jag48hlp00b5wfnkqy1kp";
1313 };
1414
15− passthru = {
16− updateScript = gnome3.updateScript { packageName = "gdm"; attrPath = "gnome3.gdm"; };
17− };
18−
1915 # Only needed to make it build
2016 preConfigure = ''
2117 substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X"
2218 '';
2319
24− postPatch = ''
25− substituteInPlace daemon/gdm-manager.c --replace "/bin/plymouth" "${plymouth}/bin/plymouth"
26− substituteInPlace data/gdm.service.in --replace "/bin/kill" "${coreutils}/bin/kill"
27− '';
28−
29− configureFlags = [ "--sysconfdir=/etc"
30− "--localstatedir=/var"
31− "--with-plymouth=yes"
32− "--with-initial-vt=7"
33− "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];
20+ configureFlags = [
21+ "--sysconfdir=/etc"
22+ "--localstatedir=/var"
23+ "--with-plymouth=yes"
24+ "--with-initial-vt=7"
25+ "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
26+ ];
3427
3528 nativeBuildInputs = [ pkgconfig libxml2 itstool intltool autoreconfHook libtool gnome3.dconf ];
36− buildInputs = [ glib accountsservice systemd
37− gobjectIntrospection libX11 gtk
38− libcanberra-gtk3 pam plymouth librsvg ];
29+ buildInputs = [
30+ glib accountsservice systemd
31+ gobjectIntrospection libX11 gtk
32+ libcanberra-gtk3 pam plymouth librsvg
33+ ];
3934
4035 enableParallelBuilding = true;
4136
4237 # Disable Access Control because our X does not support FamilyServerInterpreted yet
43− patches = [ ./sessions_dir.patch
44− ./gdm-x-session_extra_args.patch
45− ./gdm-session-worker_xserver-path.patch
46− ];
47−
48− postInstall = ''
49− # Prevent “Could not parse desktop file orca-autostart.desktop or it references a not found TryExec binary”
50− rm $out/share/gdm/greeter/autostart/orca-autostart.desktop
51− '';
38+ patches = [
39+ (substituteAll {
40+ src = ./fix-paths.patch;
41+ inherit coreutils plymouth xwayland;
42+ })
43+ ./sessions_dir.patch
44+ ./gdm-x-session_extra_args.patch
45+ ./gdm-session-worker_xserver-path.patch
46+ ];
5247
53− installFlags = [ "sysconfdir=$(out)/etc" "dbusconfdir=$(out)/etc/dbus-1/system.d" ];
48+ installFlags = [
49+ "sysconfdir=$(out)/etc"
50+ "dbusconfdir=$(out)/etc/dbus-1/system.d"
51+ ];
52+
53+ passthru = {
54+ updateScript = gnome3.updateScript {
55+ packageName = "gdm";
56+ attrPath = "gnome3.gdm";
57+ };
58+ };
5459
5560 meta = with stdenv.lib; {
56− homepage = https://wiki.gnome.org/Projects/GDM;
5761 description = "A program that manages graphical display servers and handles graphical user logins";
58− platforms = platforms.linux;
62+ homepage = https://wiki.gnome.org/Projects/GDM;
63+ license = licenses.gpl2Plus;
5964 maintainers = gnome3.maintainers;
65+ platforms = platforms.linux;
6066 };
6167}