2013-07-28 22:38:32 +02:00
|
|
|
{ stdenv, fetchurl, lightdm, pkgconfig, intltool
|
|
|
|
, hicolor_icon_theme, makeWrapper
|
|
|
|
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
|
|
|
|
}:
|
2013-03-26 11:42:18 +01:00
|
|
|
|
2013-07-28 22:38:32 +02:00
|
|
|
#ToDo: bad icons with gtk2;
|
|
|
|
# avatar icon is missing in standard hicolor theme, I don't know where gtk3 takes it from
|
|
|
|
|
|
|
|
let
|
2015-03-10 01:33:37 +01:00
|
|
|
ver_branch = "2.0";
|
2015-06-19 08:04:56 +02:00
|
|
|
version = "2.0.1";
|
2013-07-28 22:38:32 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lightdm-gtk-greeter-${version}";
|
2013-03-26 11:42:18 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-28 22:38:32 +02:00
|
|
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
|
2015-06-19 08:04:56 +02:00
|
|
|
sha256 = "031iv7zrpv27zsvahvfyrm75zdrh7591db56q89k8cjiiy600r1j";
|
2013-03-26 11:42:18 +01:00
|
|
|
};
|
|
|
|
|
2016-09-16 15:54:11 +02:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
name = "lightdm-gtk-greeter-2.0.1-lightdm-1.19.patch";
|
|
|
|
url = "https://588764.bugs.gentoo.org/attachment.cgi?id=442616";
|
|
|
|
sha256 = "0r383kjkvq9yanjc1lk878xc5g8993pjgxylqhhjb5rkpi1mbfsv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-03-10 02:42:39 +01:00
|
|
|
buildInputs = [ pkgconfig lightdm intltool makeWrapper ]
|
|
|
|
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
2013-03-26 11:42:18 +01:00
|
|
|
|
2015-03-10 01:33:37 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
|
|
|
|
|
2015-04-05 07:22:08 +02:00
|
|
|
installFlags = [
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
];
|
2013-03-26 11:42:18 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-04-05 07:22:08 +02:00
|
|
|
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
|
|
|
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
|
|
|
|
wrapProgram "$out/sbin/lightdm-gtk-greeter" \
|
|
|
|
--prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
|
|
|
|
'';
|
2013-07-28 22:38:32 +02:00
|
|
|
|
2015-03-10 01:33:37 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-07-28 22:38:32 +02:00
|
|
|
homepage = http://launchpad.net/lightdm-gtk-greeter;
|
2015-03-10 01:33:37 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ocharles wkennington ];
|
2013-07-28 22:38:32 +02:00
|
|
|
};
|
2013-03-26 11:42:18 +01:00
|
|
|
}
|