3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix

101 lines
2.7 KiB
Nix
Raw Normal View History

{ 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
, gnome-desktop, mutter, elementary-icon-theme, wingpanel-with-indicators
, elementary-gtk-theme, nixos-artwork, lightdm, numlockx
2018-08-20 21:31:18 +01:00
, clutter-gtk, libGL, dbus, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "elementary-greeter";
2018-08-20 21:31:18 +01:00
version = "3.3.1";
repoName = "greeter";
2018-08-20 21:31:18 +01:00
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
2018-08-20 21:31:18 +01:00
rev = version;
sha256 = "1vkq4z0hrmvzv4sh2qkxjajdxcycd1zj97a3pc8n4yb858pqfyzc";
};
passthru = {
updateScript = pantheon.updateScript {
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;
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
./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;
};
}