2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pantheon, pkgconfig, substituteAll, meson
|
2018-08-20 21:31:18 +01:00
|
|
|
, ninja, vala, desktop-file-utils, gtk3, granite, libgee, elementary-settings-daemon
|
2019-06-11 07:26:53 +01:00
|
|
|
, gnome-desktop, mutter, elementary-icon-theme, wingpanel-with-indicators
|
2019-06-16 20:59:06 +01:00
|
|
|
, elementary-gtk-theme, nixos-artwork, lightdm, numlockx
|
2018-08-20 21:31:18 +01:00
|
|
|
, clutter-gtk, libGL, dbus, wrapGAppsHook }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-05 23:41:32 +01:00
|
|
|
pname = "elementary-greeter";
|
2018-08-20 21:31:18 +01:00
|
|
|
version = "3.3.1";
|
|
|
|
|
2019-08-05 23:41:32 +01:00
|
|
|
repoName = "greeter";
|
2018-08-20 21:31:18 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2019-08-05 23:41:32 +01:00
|
|
|
repo = repoName;
|
2018-08-20 21:31:18 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1vkq4z0hrmvzv4sh2qkxjajdxcycd1zj97a3pc8n4yb858pqfyzc";
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = pantheon.updateScript {
|
2019-08-05 23:41:32 +01:00
|
|
|
inherit repoName;
|
|
|
|
attrPath = pname;
|
2018-08-20 21:31:18 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkgconfig
|
|
|
|
vala
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
clutter-gtk
|
|
|
|
elementary-icon-theme
|
|
|
|
elementary-gtk-theme
|
|
|
|
elementary-settings-daemon
|
|
|
|
gnome-desktop
|
|
|
|
granite
|
|
|
|
gtk3
|
|
|
|
libgee
|
|
|
|
libGL
|
|
|
|
lightdm
|
|
|
|
mutter
|
|
|
|
wingpanel-with-indicators
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./gsd.patch;
|
2019-04-05 07:00:43 +01:00
|
|
|
elementary_settings_daemon = "${elementary-settings-daemon}/libexec/";
|
2018-08-20 21:31:18 +01:00
|
|
|
})
|
|
|
|
(substituteAll {
|
|
|
|
src = ./numlockx.patch;
|
|
|
|
inherit numlockx;
|
|
|
|
})
|
|
|
|
./01-sysconfdir-install.patch
|
2019-04-05 07:30:01 +01:00
|
|
|
./hardcode-theme.patch
|
2018-08-20 21:31:18 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
# dbus-launch needed in path
|
|
|
|
--prefix PATH : "${dbus}/bin"
|
|
|
|
|
|
|
|
# for `wingpanel -g`
|
|
|
|
--prefix PATH : "${wingpanel-with-indicators}/bin"
|
|
|
|
|
|
|
|
# TODO: they should be using meson for this
|
|
|
|
# See: https://github.com/elementary/greeter/blob/19c0730fded4e9ddec5a491f0e78f83c7c04eb59/src/PantheonGreeter.vala#L451
|
|
|
|
--prefix PATH : "$out/bin"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
|
|
|
|
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
|
|
|
|
|
|
|
|
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
|
|
|
|
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" "default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LightDM Greeter for Pantheon";
|
|
|
|
homepage = https://github.com/elementary/greeter;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = pantheon.maintainers;
|
|
|
|
};
|
|
|
|
}
|