2013-07-28 21:38:32 +01:00
|
|
|
{ stdenv, fetchurl, lightdm, pkgconfig, intltool
|
|
|
|
, hicolor_icon_theme, makeWrapper
|
|
|
|
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
|
|
|
|
}:
|
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
|
|
|
|
|
|
|
|
#ToDo: Failed to open sessions directory: Error opening directory '${lightdm}/share/lightdm/remote-sessions': No such file or directory
|
|
|
|
|
|
|
|
let
|
|
|
|
ver_branch = "1.6";
|
2014-01-31 12:53:07 +00:00
|
|
|
version = "1.6.1";
|
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";
|
2014-01-31 12:53:07 +00:00
|
|
|
sha256 = "1nb8ljrbrp1zga083g3b633xi3izxxm4jipw1qgial1x16mqc0hz";
|
2013-03-26 10:42:18 +00:00
|
|
|
};
|
|
|
|
|
2014-02-06 20:55:22 +00:00
|
|
|
patches = [
|
|
|
|
./lightdm-gtk-greeter.patch
|
|
|
|
(fetchurl { # CVE-2014-0979, https://bugs.launchpad.net/lightdm-gtk-greeter/+bug/1266449
|
|
|
|
url = "https://launchpadlibrarian.net/161796033/07_fix-NULL-username.patch";
|
|
|
|
sha256 = "1sqkhsz1z10k6vlmlrqrfx452lznv30885fmnzc73p2zxdlw9q1a";
|
|
|
|
})
|
|
|
|
];
|
2014-01-31 12:53:07 +00:00
|
|
|
patchFlags = "-p1";
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2013-07-28 21:38:32 +01:00
|
|
|
buildInputs = [ pkgconfig lightdm intltool ]
|
|
|
|
++ (if useGTK2 then [ gtk2 makeWrapper ] else [ gtk3 ]);
|
2013-03-26 10:42:18 +00:00
|
|
|
|
2013-07-28 21:38:32 +01:00
|
|
|
configureFlags = stdenv.lib.optional useGTK2 "--with-gtk2";
|
2013-03-26 10:42:18 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
|
|
|
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
|
2013-07-28 21:38:32 +01:00
|
|
|
'' + stdenv.lib.optionalString useGTK2 ''
|
|
|
|
wrapProgram "$out/sbin/lightdm-gtk-greeter" \
|
|
|
|
--prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
|
2013-03-26 10:42:18 +00:00
|
|
|
'';
|
2013-07-28 21:38:32 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://launchpad.net/lightdm-gtk-greeter;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-01-31 12:53:07 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.ocharles ];
|
2013-07-28 21:38:32 +01:00
|
|
|
};
|
2013-03-26 10:42:18 +00:00
|
|
|
}
|