2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, substituteAll, pkgconfig, glib, itstool, libxml2, xorg
|
2019-11-30 23:11:47 +00:00
|
|
|
, accountsservice, libX11, gnome3, systemd, autoreconfHook, dconf
|
2019-02-13 21:47:50 +00:00
|
|
|
, gtk3, libcanberra-gtk3, pam, libtool, gobject-introspection, plymouth
|
2019-09-27 23:10:03 +01:00
|
|
|
, librsvg, coreutils, xwayland, nixos-icons, fetchpatch }:
|
2019-09-20 00:14:12 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
icon = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/4f041870efa1a6f0799ef4b32bb7be2cafee7a74/logo/nixos.svg";
|
|
|
|
sha256 = "0b0dj408c1wxmzy6k0pjwc4bzwq286f1334s3cqqwdwjshxskshk";
|
|
|
|
};
|
|
|
|
|
|
|
|
override = substituteAll {
|
|
|
|
src = ./org.gnome.login-screen.gschema.override;
|
|
|
|
inherit icon;
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gdm";
|
2019-10-07 10:44:44 +01:00
|
|
|
version = "3.34.1";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://gnome/sources/gdm/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-10-07 10:44:44 +01:00
|
|
|
sha256 = "1lyqvcwxhwxklbxn4xjswjzr6fhjix6h28mi9ypn34wdm9bzcpg8";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2016-09-18 20:35:23 +01:00
|
|
|
# Only needed to make it build
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X"
|
|
|
|
'';
|
|
|
|
|
2019-10-11 19:07:16 +01:00
|
|
|
initialVT = "7";
|
|
|
|
|
2018-04-27 17:53:21 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-plymouth=yes"
|
2018-07-23 00:34:53 +01:00
|
|
|
"--enable-gdm-xsession"
|
2019-10-11 19:07:16 +01:00
|
|
|
"--with-initial-vt=${initialVT}"
|
2018-04-27 17:53:21 +01:00
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
2018-09-05 01:44:24 +01:00
|
|
|
"--with-udevdir=$(out)/lib/udev"
|
2018-04-27 17:53:21 +01:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-11-30 23:11:47 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig libxml2 itstool autoreconfHook libtool dconf ];
|
2018-04-27 17:53:21 +01:00
|
|
|
buildInputs = [
|
|
|
|
glib accountsservice systemd
|
2019-02-13 21:47:50 +00:00
|
|
|
gobject-introspection libX11 gtk3
|
2018-04-27 17:53:21 +01:00
|
|
|
libcanberra-gtk3 pam plymouth librsvg
|
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2016-10-01 23:35:13 +01:00
|
|
|
enableParallelBuilding = true;
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2018-04-27 17:53:21 +01:00
|
|
|
patches = [
|
2018-06-30 08:33:45 +01:00
|
|
|
# Change hardcoded paths to nix store paths.
|
2018-04-27 17:53:21 +01:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
2018-04-27 18:03:19 +01:00
|
|
|
inherit coreutils plymouth xwayland;
|
2018-04-27 17:53:21 +01:00
|
|
|
})
|
2018-06-30 08:33:45 +01:00
|
|
|
|
|
|
|
# The following patches implement certain environment variables in GDM which are set by
|
|
|
|
# the gdm configuration module (nixos/modules/services/x11/display-managers/gdm.nix).
|
|
|
|
|
2018-04-27 17:53:21 +01:00
|
|
|
./gdm-x-session_extra_args.patch
|
2018-06-30 08:33:45 +01:00
|
|
|
|
|
|
|
# Allow specifying a wrapper for running the session command.
|
|
|
|
./gdm-x-session_session-wrapper.patch
|
|
|
|
|
|
|
|
# Forwards certain environment variables to the gdm-x-session child process
|
|
|
|
# to ensure that the above two patches actually work.
|
|
|
|
./gdm-session-worker_forward-vars.patch
|
2018-10-15 08:56:36 +01:00
|
|
|
|
|
|
|
# Set up the environment properly when launching sessions
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/48255
|
|
|
|
./reset-environment.patch
|
2018-04-27 17:53:21 +01:00
|
|
|
];
|
2017-09-19 11:50:26 +01:00
|
|
|
|
2018-04-27 17:53:21 +01:00
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=$(out)/etc"
|
|
|
|
"dbusconfdir=$(out)/etc/dbus-1/system.d"
|
|
|
|
];
|
|
|
|
|
2019-09-20 00:14:12 +01:00
|
|
|
preInstall = ''
|
|
|
|
schema_dir=${glib.makeSchemaPath "$out" "${pname}-${version}"}
|
|
|
|
install -D ${override} $schema_dir/org.gnome.login-screen.gschema.override
|
|
|
|
'';
|
|
|
|
|
2018-04-27 17:53:21 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = "gdm";
|
|
|
|
attrPath = "gnome3.gdm";
|
|
|
|
};
|
|
|
|
};
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A program that manages graphical display servers and handles graphical user logins";
|
2018-04-27 17:53:21 +01:00
|
|
|
homepage = https://wiki.gnome.org/Projects/GDM;
|
|
|
|
license = licenses.gpl2Plus;
|
2016-09-18 20:35:23 +01:00
|
|
|
maintainers = gnome3.maintainers;
|
2018-04-27 17:53:21 +01:00
|
|
|
platforms = platforms.linux;
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
|
|
|
}
|