2019-09-11 04:07:45 -07:00
|
|
|
{ stdenv
|
|
|
|
, lightdm_gtk_greeter
|
|
|
|
, fetchurl
|
|
|
|
, lightdm
|
|
|
|
, pkgconfig
|
|
|
|
, intltool
|
|
|
|
, linkFarm
|
|
|
|
, wrapGAppsHook
|
|
|
|
, useGTK2 ? false
|
|
|
|
, gtk2
|
|
|
|
, gtk3 # gtk3 seems better supported
|
|
|
|
, exo
|
|
|
|
, at-spi2-core
|
|
|
|
, librsvg
|
|
|
|
, hicolor-icon-theme
|
2013-07-28 13:38:32 -07:00
|
|
|
}:
|
2013-03-26 03:42:18 -07:00
|
|
|
|
2013-07-28 13:38:32 -07:00
|
|
|
#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-09 17:33:37 -07:00
|
|
|
ver_branch = "2.0";
|
2019-11-28 00:10:19 -08:00
|
|
|
version = "2.0.7";
|
2013-07-28 13:38:32 -07:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 14:52:01 -07:00
|
|
|
pname = "lightdm-gtk-greeter";
|
|
|
|
inherit version;
|
2013-03-26 03:42:18 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-13 14:52:01 -07:00
|
|
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${pname}-${version}.tar.gz";
|
2019-11-28 00:10:19 -08:00
|
|
|
sha256 = "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms";
|
2013-03-26 03:42:18 -07:00
|
|
|
};
|
|
|
|
|
2019-09-11 04:07:45 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
|
|
|
|
buildInputs = [ lightdm exo librsvg hicolor-icon-theme ]
|
2015-03-09 18:42:39 -07:00
|
|
|
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
2013-03-26 03:42:18 -07:00
|
|
|
|
2019-03-12 21:14:24 -07:00
|
|
|
configureFlags = [
|
2015-03-09 17:33:37 -07:00
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
2019-03-11 15:10:25 -07:00
|
|
|
"--disable-indicator-services-command"
|
2019-09-11 04:07:45 -07:00
|
|
|
"--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
|
2015-03-09 17:33:37 -07:00
|
|
|
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
|
|
|
|
|
2019-03-12 21:14:24 -07:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" )
|
|
|
|
'';
|
|
|
|
|
2019-10-29 19:23:29 -07:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
2018-02-24 12:21:22 -08:00
|
|
|
|
2015-04-04 22:22:08 -07:00
|
|
|
installFlags = [
|
|
|
|
"localstatedir=\${TMPDIR}"
|
2019-03-12 21:14:24 -07:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
2015-04-04 22:22:08 -07:00
|
|
|
];
|
2013-03-26 03:42:18 -07:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-04-04 22:22:08 -07:00
|
|
|
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
2019-09-11 04:10:36 -07:00
|
|
|
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
|
2015-04-04 22:22:08 -07:00
|
|
|
'';
|
2013-07-28 13:38:32 -07:00
|
|
|
|
2019-09-11 04:07:45 -07:00
|
|
|
passthru.xgreeters = linkFarm "lightdm-gtk-greeter-xgreeters" [{
|
|
|
|
path = "${lightdm_gtk_greeter}/share/xgreeters/lightdm-gtk-greeter.desktop";
|
|
|
|
name = "lightdm-gtk-greeter.desktop";
|
|
|
|
}];
|
|
|
|
|
2015-03-09 17:33:37 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://launchpad.net/lightdm-gtk-greeter";
|
2015-03-09 17:33:37 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
2019-01-26 02:01:09 -08:00
|
|
|
maintainers = with maintainers; [ ocharles ];
|
2013-07-28 13:38:32 -07:00
|
|
|
};
|
2013-03-26 03:42:18 -07:00
|
|
|
}
|