nixpkgs/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix

50 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
2017-12-17 13:58:24 +00:00
, exo
}:
#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";
2017-12-17 13:58:24 +00:00
version = "2.0.3";
in
stdenv.mkDerivation rec {
name = "lightdm-gtk-greeter-${version}";
src = fetchurl {
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
2017-12-17 13:58:24 +00:00
sha256 = "0c6v2myzqj8nzpcqyvbab7c66kwgcshw2chn5r6dhm7xrx19bcrx";
};
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 ]);
2015-03-10 00:33:37 +00:00
configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
installFlags = [
"localstatedir=\${TMPDIR}"
"sysconfdir=\${out}/etc"
];
postInstall = ''
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"
'';
2015-03-10 00:33:37 +00:00
meta = with stdenv.lib; {
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 ];
};
}