From patchwork Wed Dec 25 02:58:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Shu X-Patchwork-Id: 35527 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8897527BBE9; Wed, 25 Dec 2024 02:59:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 95A9627BBE2 for ; Wed, 25 Dec 2024 02:59:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQHc3-0005ek-5m; Tue, 24 Dec 2024 21:59:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQHc0-0005eJ-Jl for guix-patches@gnu.org; Tue, 24 Dec 2024 21:59:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQHbz-0003Ju-LB for guix-patches@gnu.org; Tue, 24 Dec 2024 21:59:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=pTx2DRNOuQ5MifZBLwtoMNty3UVE9JQMYuXI+2pfZ2Y=; b=WSuBYCJ86T3gIZpGHiganZV2DP9QDY+ZE6hHBCs+LiW6+zkW68ZhRO/gEyxGzD3f4WI4PkYlVZU62vy/Cklw1DPVWUm3pEYUo+vPGoh2+6h3Hzm1kbTSNeTmIyYqHKjEBxQA3yVhLdaP3OUhkPO5ajiW4/pAIYFQPtzYH0RxiO3s2SsJTkCsTd9ZL1r3yImNfG9b5gQw+leSvis/WaTuhO4st5f26K3C0iElz74m4nMBvoGWdYbs/wbYxD+DXEaLN/mPKldt0Ryc6RH10QHDdS2/AqmYprBay+I6YadFQZe0zDrAvljHfdeQ28rK65B7ZgRihiiAUjS4jUmg5TIurw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQHbx-0007KS-Pq; Tue, 24 Dec 2024 21:59:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75043] [PATCH v3] gnu: Add slick-greeter. References: <87ldw6vj2v.fsf@163.com> In-Reply-To: <87ldw6vj2v.fsf@163.com> Resent-From: tumashu@163.com Original-Sender: "Debbugs-submit" Resent-CC: tumashu@163.com, guix-patches@gnu.org Resent-Date: Wed, 25 Dec 2024 02:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75043 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75043@debbugs.gnu.org Cc: Feng Shu , Feng Shu X-Debbugs-Original-Xcc: Feng Shu Received: via spool by 75043-submit@debbugs.gnu.org id=B75043.173509551528119 (code B ref 75043); Wed, 25 Dec 2024 02:59:01 +0000 Received: (at 75043) by debbugs.gnu.org; 25 Dec 2024 02:58:35 +0000 Received: from localhost ([127.0.0.1]:35629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQHbW-0007JS-I5 for submit@debbugs.gnu.org; Tue, 24 Dec 2024 21:58:35 -0500 Received: from m16.mail.163.com ([117.135.210.4]:54866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQHbR-0007J9-89 for 75043@debbugs.gnu.org; Tue, 24 Dec 2024 21:58:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=pTx2D RNOuQ5MifZBLwtoMNty3UVE9JQMYuXI+2pfZ2Y=; b=NTuPpw1IIh8M0pHYzIxdP xhEyUMm1qTv23EfGC4Y6O/fDUMzqJ6nxbPu++hjHEkusCuqYhp51OCAn/ithL7JM 2E/GxPLs7e9AQBycWyWvTiOKTYgEOgl5qTVAE4bG0V9eRfpGTbBF8Gt064Sn0VWP cO2pSBUvmNsj6n+iom7MF0= Received: from localhost.localdomain (unknown [218.92.14.78]) by gzsmtp3 (Coremail) with SMTP id PigvCgBXv7LOdGtndxJDGw--.50401S2; Wed, 25 Dec 2024 10:58:22 +0800 (CST) From: tumashu@163.com Date: Wed, 25 Dec 2024 10:58:11 +0800 Message-ID: <20241225025814.13255-1-tumashu@163.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CM-TRANSID: PigvCgBXv7LOdGtndxJDGw--.50401S2 X-Coremail-Antispam: 1Uf129KBjvJXoW3JrW7Aw45Aw1rGw4fCr18AFb_yoW7Cr48pF WFkFyrGr4UJFn5XrWxWw1agw1akas3tFWrt343u34ay3y5KrWUZFy2vay5Zr1xG3W7AayU Ww4jqw17ZFyDZrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUc6pkUUUUU= X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiEQfA1Gdrbd3LlgAAsj X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Feng Shu * gnu/packages/display-managers.scm (slick-greeter): New variable. Change-Id: I9f117bd91bfe9edbd0619f434ad46399e3c59b99 --- gnu/packages/display-managers.scm | 106 ++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index df5fc0a857..4bb90a210b 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -39,6 +39,7 @@ (define-module (gnu packages display-managers) #:use-module (guix build-system qt) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) + #:use-module (guix build-system meson) #:use-module (guix build-system trivial) #:use-module (guix packages) #:use-module (guix utils) @@ -48,9 +49,11 @@ (define-module (gnu packages display-managers) #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages cinnamon) #:use-module (gnu packages crypto) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -59,6 +62,7 @@ (define-module (gnu packages display-managers) #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -461,6 +465,108 @@ (define make-flags* display manager which supports different greeters.") (license license:gpl3+))) +(define-public slick-greeter + (package + (name "slick-greeter") + (version "2.0.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/linuxmint/slick-greeter") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0pk8d8mpnrh70xdi9mfn1h5xkrf09v06vbi1p1wzqdskzfh3ci1n")))) + (build-system meson-build-system) + (arguments + (list + #:glib-or-gtk? #t + #:configure-flags + #~(list + ;; Put the binary under /bin rather than /sbin, so that it gets + ;; wrapped by the glib-or-gtk-wrap phase. + (string-append "--sbindir=" #$output "/bin")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-paths + (lambda _ + (substitute* '("src/slick-greeter.vala" + "src/session-list.vala") + (("/usr/bin/slick-greeter-") + (string-append #$output "/bin/slick-greeter-")) + (("/usr/share/slick-greeter/badges/") + (string-append #$output "/share/slick-greeter/badges/")) + (("/usr/share/xsessions/") + "/run/current-system/profile/share/xsessions/") + (("/usr/share/wayland-sessions/") + "/run/current-system/profile/share/wayland-sessions/")))) + (add-after 'glib-or-gtk-wrap 'custom-wrap + (lambda* (#:key outputs #:allow-other-keys) + (wrap-script (search-input-file + outputs "bin/slick-greeter") + ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is + ;; available at all times even outside of profiles, such as + ;; when used in the lightdm-service-type. Otherwise, it + ;; wouldn't be able to display its own icons. + `("GDK_PIXBUF_MODULE_FILE" = + (,(search-input-file + outputs + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) + `("XDG_DATA_DIRS" ":" prefix + (,(string-append "/run/current-system/profile/share:" + (getenv "XDG_DATA_DIRS")))) + '("XCURSOR_PATH" ":" prefix + ("/run/current-system/profile/share/icons"))))) + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (for-each (lambda (prog) + (wrap-program (string-append #$output "/bin/" prog) + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))) + `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))) + '("slick-greeter-check-hidpi" + "slick-greeter-set-keyboard-layout" + "slick-greeter-enable-tap-to-click")))) + (add-after 'install 'fix-.desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (substitute* (search-input-file + outputs + "share/xgreeters/slick-greeter.desktop") + (("Exec=slick-greeter") + (string-append "Exec=" + (search-input-file + outputs "bin/slick-greeter"))))))))) + (native-inputs + (list gettext-minimal + gnome-common + (list glib "bin") + pkg-config + vala)) + (inputs + (list at-spi2-core + bash-minimal ;for wrap-program + dbus + dbus-glib + gtk+ + guile-3.0 + libcanberra + libgnomekbd + libxapp + libxkbfile + lightdm + pixman + python-wrapper + python-pygobject + shared-mime-info + xvfb-run)) + (synopsis "A slick-looking LightDM greeter") + (home-page "https://github.com/linuxmint/slick-greeter") + (description "Slick-Greeter is a fork of Unity Greeter 16.04.2, it is +cross-distribution and work pretty much anywhere, it supports HiDPI, If a +default/chosen session isn't present on the system, it will scans for known +sessions dirs and replaces the invalid session choice with a valid session.") + (license license:gpl3))) + (define-public lightdm-gtk-greeter (package (name "lightdm-gtk-greeter")