2013-07-28 21:38:32 +01:00
|
|
|
{ stdenv, fetchurl, lightdm, pkgconfig, intltool
|
2018-02-25 02:23:58 +00:00
|
|
|
, hicolor-icon-theme, makeWrapper
|
2013-07-28 21:38:32 +01:00
|
|
|
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
|
2017-12-17 13:58:24 +00:00
|
|
|
, exo
|
2013-07-28 21:38:32 +01:00
|
|
|
}:
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2013-07-28 21:38:32 +01: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 00:33:37 +00:00
|
|
|
ver_branch = "2.0";
|
2018-02-27 14:13:31 +00:00
|
|
|
version = "2.0.4";
|
2013-07-28 21:38:32 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lightdm-gtk-greeter-${version}";
|
2013-03-26 10:42:18 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-28 21:38:32 +01:00
|
|
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
|
2018-02-27 14:13:31 +00:00
|
|
|
sha256 = "1svbyq2l3l2d72k10nw79jz940rqsskryaim2viy6jfpv9k5jfv1";
|
2013-03-26 10:42:18 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-12-17 13:58:24 +00:00
|
|
|
buildInputs = [ lightdm exo intltool makeWrapper ]
|
2015-03-10 01:42:39 +00:00
|
|
|
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2015-03-10 00:33:37 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
|
|
|
|
|
2015-04-05 06:22:08 +01:00
|
|
|
installFlags = [
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
];
|
2013-03-26 10:42:18 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-04-05 06:22:08 +01: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" \
|
2018-02-25 02:23:58 +00:00
|
|
|
--prefix XDG_DATA_DIRS ":" "${hicolor-icon-theme}/share"
|
2015-04-05 06:22:08 +01:00
|
|
|
'';
|
2013-07-28 21:38:32 +01:00
|
|
|
|
2015-03-10 00:33:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://launchpad.net/lightdm-gtk-greeter;
|
2015-03-10 00:33:37 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ocharles wkennington ];
|
2013-07-28 21:38:32 +01:00
|
|
|
};
|
2013-03-26 10:42:18 +00:00
|
|
|
}
|