2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-06-20 14:57:18 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2022-08-21 13:32:41 +00:00
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, vala
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-07-15 17:15:38 +00:00
|
|
|
, cinnamon
|
2022-08-21 13:32:41 +00:00
|
|
|
, lightdm
|
|
|
|
, gtk3
|
|
|
|
, pixman
|
|
|
|
, libcanberra
|
2023-07-15 17:15:38 +00:00
|
|
|
, libgnomekbd
|
2022-08-21 13:32:41 +00:00
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, linkFarm
|
|
|
|
, lightdm-slick-greeter
|
|
|
|
, numlockx
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lightdm-slick-greeter";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.0.5";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = "slick-greeter";
|
|
|
|
rev = version;
|
2024-06-20 14:57:18 +00:00
|
|
|
sha256 = "sha256-Q37CprukHvDRBcuPbfusKg2DY+JCwmjVX1+KnfSH2iw=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-06-20 14:57:18 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2022-08-21 13:32:41 +00:00
|
|
|
pkg-config
|
|
|
|
vala
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2022-08-21 13:32:41 +00:00
|
|
|
python3
|
|
|
|
python3.pkgs.wrapPython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
cinnamon.xapp
|
2022-08-21 13:32:41 +00:00
|
|
|
lightdm
|
|
|
|
gtk3
|
|
|
|
pixman
|
|
|
|
libcanberra
|
2023-07-15 17:15:38 +00:00
|
|
|
libgnomekbd # needed by XApp.KbdLayoutController
|
2022-08-21 13:32:41 +00:00
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
python3.pkgs.pygobject3 # for slick-greeter-check-hidpi
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/slick-greeter.vala \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "/usr/bin/numlockx" "${numlockx}/bin/numlockx" \
|
|
|
|
--replace-fail "/usr/share/xsessions/" "/run/current-system/sw/share/xsessions/" \
|
|
|
|
--replace-fail "/usr/share/wayland-sessions/" "/run/current-system/sw/share/wayland-sessions/" \
|
|
|
|
--replace-fail "/usr/bin/slick-greeter" "${placeholder "out"}/bin/slick-greeter"
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
substituteInPlace src/session-list.vala \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "/usr/share" "${placeholder "out"}/share"
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# We prefer stable path here.
|
|
|
|
substituteInPlace data/x.dm.slick-greeter.gschema.xml \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "/usr/share/onboard" "/run/current-system/sw/share/onboard"
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
patchShebangs files/usr/bin/*
|
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
mesonFlags = [
|
2022-08-21 13:32:41 +00:00
|
|
|
"--sbindir=${placeholder "out"}/bin"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace "$out/share/xgreeters/slick-greeter.desktop" \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "Exec=slick-greeter" "Exec=$out/bin/slick-greeter"
|
2022-08-21 13:32:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.xgreeters = linkFarm "lightdm-slick-greeter-xgreeters" [{
|
|
|
|
path = "${lightdm-slick-greeter}/share/xgreeters/slick-greeter.desktop";
|
|
|
|
name = "lightdm-slick-greeter.desktop";
|
|
|
|
}];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Slick-looking LightDM greeter";
|
2022-08-21 13:32:41 +00:00
|
|
|
homepage = "https://github.com/linuxmint/slick-greeter";
|
|
|
|
license = licenses.gpl3Only;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ water-sucks bobby285271 ];
|
2022-08-21 13:32:41 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|