2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
, linkFarm
|
|
|
|
, substituteAll
|
|
|
|
, elementary-greeter
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, vala
|
|
|
|
, desktop-file-utils
|
|
|
|
, gtk3
|
|
|
|
, granite
|
|
|
|
, libgee
|
2021-09-22 15:38:15 +00:00
|
|
|
, libhandy
|
|
|
|
, gnome-settings-daemon
|
2020-04-24 23:36:52 +00:00
|
|
|
, mutter
|
|
|
|
, elementary-icon-theme
|
|
|
|
, wingpanel-with-indicators
|
|
|
|
, elementary-gtk-theme
|
|
|
|
, nixos-artwork
|
|
|
|
, lightdm
|
|
|
|
, gdk-pixbuf
|
|
|
|
, clutter-gtk
|
|
|
|
, dbus
|
|
|
|
, accountsservice
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elementary-greeter";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "6.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2021-12-24 04:21:11 +00:00
|
|
|
repo = "greeter";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-6rjZOX9JOTjZwqWVWTtKjGNy8KgWllE9VQZzwhuBAwE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
patches = [
|
|
|
|
./sysconfdir-install.patch
|
|
|
|
# Needed until https://github.com/elementary/greeter/issues/360 is fixed
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-fallback-background.patch;
|
|
|
|
default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
vala
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
accountsservice
|
|
|
|
clutter-gtk # else we get could not generate cargs for mutter-clutter-2
|
|
|
|
elementary-icon-theme
|
2021-09-22 15:38:15 +00:00
|
|
|
gnome-settings-daemon
|
2020-04-24 23:36:52 +00:00
|
|
|
gdk-pixbuf
|
|
|
|
granite
|
|
|
|
gtk3
|
|
|
|
libgee
|
2021-09-22 15:38:15 +00:00
|
|
|
libhandy
|
2020-04-24 23:36:52 +00:00
|
|
|
lightdm
|
|
|
|
mutter
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
# A hook does this but after wrapGAppsHook so the files never get wrapped.
|
|
|
|
"--sbindir=${placeholder "out"}/bin"
|
|
|
|
# baked into the program for discovery of the greeter configuration
|
|
|
|
"--sysconfdir=/etc"
|
2021-09-22 15:38:15 +00:00
|
|
|
"-Dgsd-dir=${gnome-settings-daemon}/libexec/" # trailing slash is needed
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
# dbus-launch needed in path
|
|
|
|
--prefix PATH : "${dbus}/bin"
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
# for `io.elementary.wingpanel -g`
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PATH : "${wingpanel-with-indicators}/bin"
|
|
|
|
|
|
|
|
# for the compositor
|
|
|
|
--prefix PATH : "$out/bin"
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# the GTK theme is hardcoded
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "${elementary-gtk-theme}/share"
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
# the icon theme is hardcoded
|
|
|
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Use NixOS default wallpaper
|
|
|
|
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
|
|
|
|
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" \
|
2020-06-18 07:06:33 +00:00
|
|
|
"default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
|
|
|
|
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
|
|
|
|
'';
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = "pantheon.${pname}";
|
|
|
|
};
|
|
|
|
|
|
|
|
xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
|
|
|
|
path = "${elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
|
|
|
|
name = "io.elementary.greeter.desktop";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "LightDM Greeter for Pantheon";
|
|
|
|
homepage = "https://github.com/elementary/greeter";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = teams.pantheon.members;
|
2021-12-06 16:07:01 +00:00
|
|
|
mainProgram = "io.elementary.greeter";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|