1 { lib, stdenv, linkFarm, lightdm-tiny-greeter, fetchFromGitHub
2 , pkg-config, lightdm, gtk3, glib, wrapGAppsHook, config, conf ? config.lightdm-tiny-greeter.conf or "" }:
4 stdenv.mkDerivation rec {
5 pname = "lightdm-tiny-greeter";
8 src = fetchFromGitHub {
10 repo = "lightdm-tiny-greeter";
12 sha256 = "08azpj7b5qgac9bgi1xvd6qy6x2nb7iapa0v40ggr3d1fabyhrg6";
15 nativeBuildInputs = [ pkg-config wrapGAppsHook ];
16 buildInputs = [ lightdm gtk3 glib ];
18 postUnpack = lib.optionalString (conf != "") ''
19 cp ${builtins.toFile "config.h" conf} source/config.h
23 mkdir -p $out/bin $out/share/xgreeters
25 mv ${pname} $out/bin/.
26 mv lightdm-tiny-greeter.desktop $out/share/xgreeters
30 substituteInPlace "$out/share/xgreeters/lightdm-tiny-greeter.desktop" \
31 --replace "Exec=lightdm-tiny-greeter" "Exec=$out/bin/lightdm-tiny-greeter"
34 passthru.xgreeters = linkFarm "lightdm-tiny-greeter-xgreeters" [{
35 path = "${lightdm-tiny-greeter}/share/xgreeters/lightdm-tiny-greeter.desktop";
36 name = "lightdm-tiny-greeter.desktop";
40 description = "A tiny multi user lightdm greeter";
41 homepage = "https://github.com/off-world/lightdm-tiny-greeter";
42 license = licenses.bsd3;
43 maintainers = with maintainers; [ edwtjo ];
44 platforms = platforms.linux;