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