2021-01-15 05:42:41 +00:00
|
|
|
{ lib, stdenv
|
2022-07-28 19:36:55 +00:00
|
|
|
, buildPackages
|
2019-10-12 23:06:04 +00:00
|
|
|
, fetchFromGitHub
|
2020-07-29 16:33:39 +00:00
|
|
|
, nix-update-script
|
2019-10-12 23:06:04 +00:00
|
|
|
, substituteAll
|
|
|
|
, plymouth
|
|
|
|
, pam
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config
|
2019-10-12 23:06:04 +00:00
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
|
|
|
, libxcb
|
|
|
|
, glib
|
|
|
|
, libXdmcp
|
|
|
|
, itstool
|
|
|
|
, intltool
|
|
|
|
, libxklavier
|
|
|
|
, libgcrypt
|
|
|
|
, audit
|
|
|
|
, busybox
|
|
|
|
, polkit
|
|
|
|
, accountsservice
|
|
|
|
, gtk-doc
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2019-10-12 23:06:04 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, vala
|
|
|
|
, fetchpatch
|
|
|
|
, withQt5 ? false
|
|
|
|
, qtbase
|
2019-11-20 03:30:05 +00:00
|
|
|
, yelp-tools
|
2015-03-10 00:32:49 +00:00
|
|
|
}:
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2013-07-28 20:38:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-07-27 15:37:49 +00:00
|
|
|
pname = "lightdm";
|
2022-08-01 06:04:05 +00:00
|
|
|
version = "1.32.0";
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2018-08-30 22:22:43 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2018-07-27 15:37:49 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-08-01 06:04:05 +00:00
|
|
|
owner = "canonical";
|
2018-07-27 15:37:49 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-01 06:04:05 +00:00
|
|
|
sha256 = "sha256-ttNlhWD0Ran4d3QvZ+PxbFbSUGMkfrRm+hJdQxIDJvM=";
|
2013-03-26 10:42:18 +00:00
|
|
|
};
|
|
|
|
|
2018-07-27 15:37:49 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
automake
|
2019-11-20 03:30:05 +00:00
|
|
|
yelp-tools
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.yelp-xsl
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection
|
2018-07-27 15:37:49 +00:00
|
|
|
gtk-doc
|
|
|
|
intltool
|
|
|
|
itstool
|
|
|
|
libtool
|
2021-01-17 02:09:27 +00:00
|
|
|
pkg-config
|
2018-07-27 15:37:49 +00:00
|
|
|
vala
|
|
|
|
];
|
|
|
|
|
2013-07-28 20:38:32 +00:00
|
|
|
buildInputs = [
|
2018-07-27 15:37:49 +00:00
|
|
|
accountsservice
|
|
|
|
audit
|
|
|
|
glib
|
2019-03-19 06:23:18 +00:00
|
|
|
libXdmcp
|
2018-07-27 15:37:49 +00:00
|
|
|
libgcrypt
|
|
|
|
libxcb
|
|
|
|
libxklavier
|
|
|
|
pam
|
|
|
|
polkit
|
2023-01-21 22:06:40 +00:00
|
|
|
] ++ lib.optional withQt5 qtbase;
|
2018-07-27 15:37:49 +00:00
|
|
|
|
2019-03-11 05:09:50 +00:00
|
|
|
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-12 23:06:04 +00: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";
|
|
|
|
})
|
2019-03-11 05:09:50 +00:00
|
|
|
];
|
2018-07-27 15:37:49 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2018-07-27 15:37:49 +00:00
|
|
|
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
|
2015-03-10 00:32:49 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
2015-09-18 06:24:48 +00:00
|
|
|
"--disable-tests"
|
2019-03-11 05:09:50 +00:00
|
|
|
"--disable-dmrc"
|
2023-01-21 22:06:40 +00:00
|
|
|
] ++ lib.optional withQt5 "--enable-liblightdm-qt5";
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2015-04-05 05:20:28 +00:00
|
|
|
installFlags = [
|
2019-09-03 16:38:57 +00:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
2015-04-05 05:20:28 +00:00
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2017-12-06 12:23:30 +00:00
|
|
|
prePatch = ''
|
2018-07-27 15:37:49 +00:00
|
|
|
substituteInPlace autogen.sh \
|
2022-07-28 19:36:55 +00:00
|
|
|
--replace "which" "${buildPackages.busybox}/bin/which"
|
2018-07-27 15:37:49 +00:00
|
|
|
|
2017-12-06 12:23:30 +00:00
|
|
|
substituteInPlace src/shared-data-manager.c \
|
2018-07-27 15:37:49 +00:00
|
|
|
--replace /bin/rm ${busybox}/bin/rm
|
2017-12-06 12:23:30 +00:00
|
|
|
'';
|
|
|
|
|
2019-10-12 23:56:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/etc/apparmor.d $out/etc/init $out/etc/pam.d
|
|
|
|
'';
|
|
|
|
|
2020-07-29 16:33:39 +00:00
|
|
|
passthru = {
|
2022-12-25 22:11:14 +00:00
|
|
|
updateScript = nix-update-script { };
|
2020-07-29 16:33:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2023-01-21 22:06:40 +00:00
|
|
|
meta = with lib; {
|
2022-08-01 06:04:05 +00:00
|
|
|
homepage = "https://github.com/canonical/lightdm";
|
2019-03-11 05:09:50 +00:00
|
|
|
description = "A cross-desktop display manager";
|
2015-03-10 00:32:49 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
2021-08-02 00:46:24 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
2013-03-26 10:42:18 +00:00
|
|
|
};
|
2013-07-28 20:38:32 +00:00
|
|
|
}
|