Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / display-managers / lightdm / gtk-greeter.nix
blob1a949c4dc0a3b7f5819162d192b50765e2b39602
1 { stdenv
2 , lib
3 , lightdm-gtk-greeter
4 , fetchurl
5 , lightdm
6 , pkg-config
7 , intltool
8 , linkFarm
9 , wrapGAppsHook
10 , gtk3
11 , xfce4-dev-tools
12 , at-spi2-core
13 , librsvg
14 , hicolor-icon-theme
17 stdenv.mkDerivation rec {
18   pname = "lightdm-gtk-greeter";
19   version = "2.0.8";
21   src = fetchurl {
22     # Release tarball differs from source tarball.
23     url = "https://github.com/Xubuntu/lightdm-gtk-greeter/releases/download/lightdm-gtk-greeter-${version}/lightdm-gtk-greeter-${version}.tar.gz";
24     sha256 = "vvuzAMezT/IYZf28iBIB9zD8fFYOngHRfomelHcVBhM=";
25   };
27   nativeBuildInputs = [
28     pkg-config
29     intltool
30     xfce4-dev-tools
31     wrapGAppsHook
32   ];
34   buildInputs = [
35     lightdm
36     librsvg
37     hicolor-icon-theme
38     gtk3
39   ];
41   configureFlags = [
42     "--localstatedir=/var"
43     "--sysconfdir=/etc"
44     "--disable-indicator-services-command"
45     "--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
46   ];
48   preConfigure = ''
49     configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" )
50   '';
52   installFlags = [
53     "localstatedir=\${TMPDIR}"
54     "sysconfdir=${placeholder "out"}/etc"
55   ];
57   postInstall = ''
58     substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
59       --replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
60   '';
62   passthru.xgreeters = linkFarm "lightdm-gtk-greeter-xgreeters" [{
63     path = "${lightdm-gtk-greeter}/share/xgreeters/lightdm-gtk-greeter.desktop";
64     name = "lightdm-gtk-greeter.desktop";
65   }];
67   meta = with lib; {
68     homepage = "https://github.com/Xubuntu/lightdm-gtk-greeter";
69     description = "A GTK greeter for LightDM";
70     platforms = platforms.linux;
71     license = licenses.gpl3Plus;
72     maintainers = with maintainers; [ bobby285271 ];
73   };