From dbb8aadf844122fe1287977ca673e7577242368c Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Sat, 12 Oct 2019 19:06:04 -0400 Subject: [PATCH] lightdm: hardcode path to plymouth --- .../display-managers/lightdm/default.nix | 43 ++++++++++++++++--- .../display-managers/lightdm/fix-paths.patch | 13 ++++++ 2 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 pkgs/applications/display-managers/lightdm/fix-paths.patch diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index 795472bf64a..925f895b35e 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -1,8 +1,32 @@ -{ stdenv, fetchFromGitHub, pam, pkgconfig, autoconf, automake, libtool, libxcb -, glib, libXdmcp, itstool, intltool, libxklavier, libgcrypt, audit, busybox -, polkit, accountsservice, gtk-doc, gnome3, gobject-introspection, vala, fetchpatch -, withQt4 ? false, qt4 -, withQt5 ? false, qtbase +{ stdenv +, fetchFromGitHub +, substituteAll +, plymouth +, pam +, pkgconfig +, autoconf +, automake +, libtool +, libxcb +, glib +, libXdmcp +, itstool +, intltool +, libxklavier +, libgcrypt +, audit +, busybox +, polkit +, accountsservice +, gtk-doc +, gnome3 +, gobject-introspection +, vala +, fetchpatch +, withQt4 ? false +, qt4 +, withQt5 ? false +, qtbase }: with stdenv.lib; @@ -53,11 +77,20 @@ stdenv.mkDerivation rec { url = "https://src.fedoraproject.org/rpms/lightdm/raw/4cf0d2bed8d1c68970b0322ccd5dbbbb7a0b12bc/f/lightdm-1.25.1-disable_dmrc.patch"; sha256 = "06f7iabagrsiws2l75sx2jyljknr9js7ydn151p3qfi104d1541n"; }) + # Don't use etc/dbus-1/system.d (fetchpatch { url = "https://github.com/canonical/lightdm/commit/a99376f5f51aa147aaf81287d7ce70db76022c47.patch"; sha256 = "1zyx1qqajrmqcf9hbsapd39gmdanswd9l78rq7q6rdy4692il3yn"; }) + + # Hardcode plymouth to fix transitions. + # For some reason it can't find `plymouth` + # even when it's in PATH in environment.systemPackages. + (substituteAll { + src = ./fix-paths.patch; + plymouth = "${plymouth}/bin/plymouth"; + }) ]; preConfigure = "NOCONFIGURE=1 ./autogen.sh"; diff --git a/pkgs/applications/display-managers/lightdm/fix-paths.patch b/pkgs/applications/display-managers/lightdm/fix-paths.patch new file mode 100644 index 00000000000..4498bc4d1a3 --- /dev/null +++ b/pkgs/applications/display-managers/lightdm/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/plymouth.c b/src/plymouth.c +index d1ed91f4..318f9409 100644 +--- a/src/plymouth.c ++++ b/src/plymouth.c +@@ -24,7 +24,7 @@ static gboolean has_active_vt = FALSE; + static gboolean + plymouth_run_command (const gchar *command, gint *exit_status) + { +- g_autofree gchar *command_line = g_strdup_printf ("plymouth %s", command); ++ g_autofree gchar *command_line = g_strdup_printf ("@plymouth@ %s", command); + g_autoptr(GError) error = NULL; + gboolean result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error); +