nixpkgs/pkgs/applications/display-managers/lightdm/default.nix

146 lines
3.0 KiB
Nix
Raw Normal View History

2019-10-13 00:06:04 +01:00
{ stdenv
, fetchFromGitHub
, nix-update-script
2019-10-13 00:06:04 +01:00
, substituteAll
, plymouth
, pam
, pkgconfig
, autoconf
, automake
, libtool
, libxcb
, glib
, libXdmcp
, itstool
, intltool
, libxklavier
, libgcrypt
, audit
, busybox
, polkit
, accountsservice
, gtk-doc
, gnome3
, gobject-introspection
, vala
, fetchpatch
, withQt4 ? false
, qt4
, withQt5 ? false
, qtbase
2019-11-20 03:30:05 +00:00
, yelp-tools
2015-03-10 00:32:49 +00:00
}:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "lightdm";
2019-05-17 11:23:31 +01:00
version = "1.30.0";
2018-08-30 23:22:43 +01:00
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "CanonicalLtd";
repo = pname;
rev = version;
2019-05-17 11:23:31 +01:00
sha256 = "0i1yygmjbkdjnqdl9jn8zsa1mfs2l19qc4k2capd8q1ndhnjm2dx";
};
nativeBuildInputs = [
autoconf
automake
2019-11-20 03:30:05 +00:00
yelp-tools
gnome3.yelp-xsl
gobject-introspection
gtk-doc
intltool
itstool
libtool
pkgconfig
vala
];
buildInputs = [
accountsservice
audit
glib
libXdmcp
libgcrypt
libxcb
libxklavier
pam
polkit
] ++ optional withQt4 qt4
++ optional withQt5 qtbase;
patches = [
# Adds option to disable writing dmrc files
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/lightdm/raw/4cf0d2bed8d1c68970b0322ccd5dbbbb7a0b12bc/f/lightdm-1.25.1-disable_dmrc.patch";
sha256 = "06f7iabagrsiws2l75sx2jyljknr9js7ydn151p3qfi104d1541n";
})
2019-10-13 00:06:04 +01:00
# Don't use etc/dbus-1/system.d
(fetchpatch {
url = "https://github.com/canonical/lightdm/commit/a99376f5f51aa147aaf81287d7ce70db76022c47.patch";
sha256 = "1zyx1qqajrmqcf9hbsapd39gmdanswd9l78rq7q6rdy4692il3yn";
})
2019-10-13 00:06:04 +01:00
# https://github.com/canonical/lightdm/pull/104
(fetchpatch {
url = "https://github.com/canonical/lightdm/commit/03f218981733e50d810767f9d04e42ee156f7feb.patch";
sha256 = "07w18m2gpk29z6ym4y3lzsmg5dk3ffn39sq6lac26ap7narf4ma7";
})
2019-10-13 00:06:04 +01:00
# Hardcode plymouth to fix transitions.
# For some reason it can't find `plymouth`
# even when it's in PATH in environment.systemPackages.
(substituteAll {
src = ./fix-paths.patch;
plymouth = "${plymouth}/bin/plymouth";
})
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
2015-03-10 00:32:49 +00:00
configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
2015-09-18 07:24:48 +01:00
"--disable-tests"
"--disable-dmrc"
] ++ optional withQt4 "--enable-liblightdm-qt"
++ optional withQt5 "--enable-liblightdm-qt5";
2015-04-05 06:20:28 +01:00
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
2015-04-05 06:20:28 +01:00
"localstatedir=\${TMPDIR}"
];
prePatch = ''
substituteInPlace autogen.sh \
--replace "which" "${busybox}/bin/which"
substituteInPlace src/shared-data-manager.c \
--replace /bin/rm ${busybox}/bin/rm
'';
2019-10-13 00:56:40 +01:00
postInstall = ''
rm -rf $out/etc/apparmor.d $out/etc/init $out/etc/pam.d
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = {
homepage = "https://github.com/CanonicalLtd/lightdm";
description = "A cross-desktop display manager";
2015-03-10 00:32:49 +00:00
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = with maintainers; [ ocharles worldofpeace ];
};
}