1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, lightdm, pkgconfig, intltool
, hicolor_icon_theme, makeWrapper
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
}:
#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";
in
stdenv.mkDerivation rec {
name = "lightdm-gtk-greeter-${version}";
src = fetchurl {
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
2014-01-31 12:53:07 +00:00
sha256 = "1nb8ljrbrp1zga083g3b633xi3izxxm4jipw1qgial1x16mqc0hz";
};
patches = [ ./lightdm-gtk-greeter.patch ];
2014-01-31 12:53:07 +00:00
patchFlags = "-p1";
buildInputs = [ pkgconfig lightdm intltool ]
++ (if useGTK2 then [ gtk2 makeWrapper ] else [ gtk3 ]);
configureFlags = stdenv.lib.optional useGTK2 "--with-gtk2";
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
'' + stdenv.lib.optionalString useGTK2 ''
wrapProgram "$out/sbin/lightdm-gtk-greeter" \
--prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
'';
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 ];
};
}