pantheon.elementary-greeter: 3.3.1 -> 2019-09-10

https://github.com/elementary/greeter/releases/tag/5.0
This commit is contained in:
worldofpeace 2019-03-18 08:39:16 -04:00 committed by worldofpeace
parent 0c457cb348
commit 98470bb610
6 changed files with 52 additions and 81 deletions

View File

@ -90,9 +90,7 @@ lib.makeScope pkgs.newScope (self: with self; {
elementary-default-settings = callPackage ./desktop/elementary-default-settings { };
elementary-greeter = callPackage ./desktop/elementary-greeter {
inherit (gnome3) gnome-desktop;
};
elementary-greeter = callPackage ./desktop/elementary-greeter { };
elementary-print-shim = callPackage ./desktop/elementary-print-shim { };

View File

@ -1,20 +1,39 @@
{ stdenv, fetchFromGitHub, pantheon, pkgconfig, substituteAll, meson
, 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
, clutter-gtk, libGL, dbus, wrapGAppsHook }:
{ stdenv
, fetchFromGitHub
, pantheon
, pkgconfig
, meson
, ninja
, vala
, desktop-file-utils
, gtk3
, granite
, libgee
, elementary-settings-daemon
, 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";
version = "3.3.1";
version = "unstable-2019-09-10";
repoName = "greeter";
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "1vkq4z0hrmvzv4sh2qkxjajdxcycd1zj97a3pc8n4yb858pqfyzc";
rev = "cad7d28d2b40ed04f6ce49ab44408297b5c69468";
sha256 = "0m8iq04wdwgg6arm7dzwi7a0snxvss62zpnw2knpr6lp77vd7hqr";
};
passthru = {
@ -34,38 +53,32 @@ stdenv.mkDerivation rec {
];
buildInputs = [
clutter-gtk
elementary-icon-theme
accountsservice
clutter-gtk # else we get could not generate cargs for mutter-clutter-2
elementary-gtk-theme
elementary-icon-theme
elementary-settings-daemon
gnome-desktop
gdk-pixbuf
granite
gtk3
libgee
libGL
lightdm
mutter
wingpanel-with-indicators
];
patches = [
(substituteAll {
src = ./gsd.patch;
elementary_settings_daemon = "${elementary-settings-daemon}/libexec/";
})
(substituteAll {
src = ./numlockx.patch;
inherit numlockx;
})
./01-sysconfdir-install.patch
./hardcode-theme.patch
];
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"
# We use the patched gnome-settings-daemon
"-Dubuntu-patched-gsd=true"
"-Dgsd-dir=${elementary-settings-daemon}/libexec/" # trailing slash is needed
];
patches = [
./sysconfdir-install.patch
];
preFixup = ''
@ -76,18 +89,19 @@ stdenv.mkDerivation rec {
# 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
# for the compositor
--prefix PATH : "$out/bin"
)
'';
postFixup = ''
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
# Use NixOS default wallpaper
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"
--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"
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
'';
meta = with stdenv.lib; {

View File

@ -1,13 +0,0 @@
diff --git a/src/meson.build b/src/meson.build
index 2450c1a..a908d11 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,7 +1,7 @@
conf_data = configuration_data()
conf_data.set('CONF_DIR', join_paths(get_option('sysconfdir'), 'lightdm'))
conf_data.set('GETTEXT_PACKAGE', meson.project_name())
-conf_data.set('GSD_DIR', '/usr/lib/gnome-settings-daemon/')
+conf_data.set('GSD_DIR', '@elementary_settings_daemon@')
conf_data.set('VERSION', meson.project_version())
config_header = configure_file (
input: 'config.vala.in',

View File

@ -1,15 +0,0 @@
diff --git a/src/PantheonGreeter.vala b/src/PantheonGreeter.vala
index 11aa4c0..daf4a8a 100644
--- a/src/PantheonGreeter.vala
+++ b/src/PantheonGreeter.vala
@@ -474,6 +474,10 @@ public static int main (string [] args) {
Gdk.CursorType.LEFT_PTR);
Gdk.get_default_root_window ().set_cursor (cursor);
+ var settings = Gtk.Settings.get_default ();
+ settings.gtk_icon_theme_name = "elementary";
+ settings.gtk_theme_name = "elementary";
+
var icon_theme = Gtk.IconTheme.get_default ();
icon_theme.add_resource_path ("/io/elementary/greeter/icons");

View File

@ -1,13 +0,0 @@
diff --git a/src/PantheonGreeter.vala b/src/PantheonGreeter.vala
index 11aa4c0..ae7bf7e 100644
--- a/src/PantheonGreeter.vala
+++ b/src/PantheonGreeter.vala
@@ -163,7 +163,7 @@ public class PantheonGreeter : Gtk.Window {
warning (e.message);
}
if (activate_numlock) {
- Granite.Services.System.execute_command ("/usr/bin/numlockx on");
+ Granite.Services.System.execute_command ("@numlockx@/bin/numlockx on");
}
var screensaver_timeout = 60;

View File

@ -1,14 +1,14 @@
From 2384bee55a46eac44eb9d329be4c2a097e053ae1 Mon Sep 17 00:00:00 2001
From 7bb0d507cbb0122f167127b9f6460bd53d8234de Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@users.noreply.github.com>
Date: Tue, 17 Jul 2018 07:04:18 -0400
Subject: [PATCH 1/1] 'sysconfdir' will be etc not /etc for install
Date: Sat, 16 Mar 2019 16:07:24 -0400
Subject: [PATCH] 'sysconfdir' will be etc not /etc for install
---
data/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/meson.build b/data/meson.build
index 7621b03..7c08eaf 100644
index fd54b75..b1120ae 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -20,7 +20,7 @@ i18n.merge_file (
@ -19,7 +19,7 @@ index 7621b03..7c08eaf 100644
+ install_dir: join_paths(get_option('prefix'), 'etc', 'lightdm')
)
install_data(
test (
--
2.17.1
2.19.2