From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AKm7LF57fmec4AAAe85BDQ:P1 (envelope-from ) for ; Wed, 08 Jan 2025 13:19:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id AKm7LF57fmec4AAAe85BDQ (envelope-from ) for ; Wed, 08 Jan 2025 14:19:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="Eu/b4R7W"; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=NPr3DHRy; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=163.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736342366; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=t/hv2s6lZJBpMzqSddSH9sMzUs0sYz7G9MDCZY/WxcA=; b=CCtmS/QSPpwLq2COU6RJa5uu+eh2hMdnvXxN97OD32UkC+DNbOChq/UiGuiTYL8fqtdIyc l1XOapc+OhG5Lba0zpiw/2sk2gLM66X/UTwqLekaDXcC3MJLCyV34zGCsnICj5oybB3+tk t5JnAHuvhZhVEJSI04vDU7cIIlj0QGVbem/UhN7h1KO11lBeRD/WL3KZ77pmAufd66/LVz qEMsNTx4oMJkLYCOqfX6dyk5d3QzG4+MmNScufZU1lCdUVEPtaq4dUwnLwkbjETNaKaWlL iOLwrVJDGp7/H7Z3ofhtKso5JECwAbKQ5C70wzXeakMS3BibWzJ07sGN+Z19Gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="Eu/b4R7W"; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=NPr3DHRy; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=163.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736342366; a=rsa-sha256; cv=none; b=q3HOJo7xxR8TuviNpGoHVsbI3gTooA2YpkojiQKroEXr/+1/aq9zj9Mze5ikhnHbkimGO/ 0Hvb4IA13txZAWplVwRD7tfQJtVvF6Ac8P47yiUcpDcOvHon4FxhXgB2amlEx9bzeR63Op Ord1fIr8dpiAhj7XHd3ger8eUdsKkJW3W3cwJET05ULXLr30du2G0Cnv0y3r8yNRvOUGa1 BN+wvihiYF/b7aAaErDgYuILA8spW7hdrNIU24N9cyaTfbJ8gDULlPY5cPc+9gCVq7jSTT SHHrNr3DyVIeSwisxalN3JURY1+Q/jsqw1EOpLhJVAEFR7DF/aErhwbGpN1pKA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0AAAD56721 for ; Wed, 08 Jan 2025 14:19:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVVxl-0002ES-Dj; Wed, 08 Jan 2025 08:19:09 -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 1tVVxg-00028s-Gb for guix-patches@gnu.org; Wed, 08 Jan 2025 08:19: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 1tVVxg-00007h-7R for guix-patches@gnu.org; Wed, 08 Jan 2025 08:19: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=t/hv2s6lZJBpMzqSddSH9sMzUs0sYz7G9MDCZY/WxcA=; b=Eu/b4R7WuMZ4Om7/x6Aklqcek0j8zwKpq25l+9+XA8I/VcKXJ0ugIphSNZXcWzWpgXdr52R36Ls9vvy5YKvGv8suhpkHA2aYe8bpVuJNfUceC/8/39UfHn6eMV3fW/hOPkR4rLG1hch/5GTyhxCvHu+eESSKOMEMR4tKaIQYugUlrSf1Khdoghh6Kdt+kkApBQM0EfIE0CQaWRW2p2yVhTviFZmsameckpNx8HDd+7Fw5tyr+B/LdeyJfqbnkHBfyMRFnu9qWugpMlfsfCBMxdHqsFxSY5op/1z4QU0htf7fnhqr+kDwMwEm3TeGTVo99xqGT/yv/mDqGefIYFgXUg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVVxe-0002RI-4S; Wed, 08 Jan 2025 08:19:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75417] [PATCH v2] gnu: Add lightdm-tiny-greeter. References: <20250107051656.96492-1-tumashu@163.com> In-Reply-To: <20250107051656.96492-1-tumashu@163.com> Resent-From: tumashu@163.com Original-Sender: "Debbugs-submit" Resent-CC: tumashu@163.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75417 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75417@debbugs.gnu.org Cc: Feng Shu , tumashu@163.com X-Debbugs-Original-Xcc: tumashu@163.com Received: via spool by 75417-submit@debbugs.gnu.org id=B75417.17363423129335 (code B ref 75417); Wed, 08 Jan 2025 13:19:02 +0000 Received: (at 75417) by debbugs.gnu.org; 8 Jan 2025 13:18:32 +0000 Received: from localhost ([127.0.0.1]:46459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVVx9-0002QU-Tq for submit@debbugs.gnu.org; Wed, 08 Jan 2025 08:18:32 -0500 Received: from m16.mail.163.com ([220.197.31.5]:41564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVVx5-0002QI-Pt for 75417@debbugs.gnu.org; Wed, 08 Jan 2025 08:18:31 -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=t/hv2 s6lZJBpMzqSddSH9sMzUs0sYz7G9MDCZY/WxcA=; b=NPr3DHRyZDRmHisGwlgi0 h5FKEjmD2OlaeFkvOXR9scTMP8hsPzXjkmu5tn+sVly+Mi6KRVLtzhFHiH+q1NyA nRmZKkcvusBdtjLyQV5kDicpjIyygHptWdIkFZE5pOKg65ITz1rPEVXgUF/cNC2F +WCPNzW0RQgioSyF5RLBDA= Received: from localhost.localdomain (unknown [180.105.150.230]) by gzsmtp5 (Coremail) with SMTP id QCgvCgD3rdkYe35nBp5wJw--.49129S2; Wed, 08 Jan 2025 21:18:20 +0800 (CST) From: tumashu@163.com Date: Wed, 8 Jan 2025 21:18:03 +0800 Message-ID: <20250108131807.15759-1-tumashu@163.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: QCgvCgD3rdkYe35nBp5wJw--.49129S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxCr4kuw4Dtr15WFW5uF13XFb_yoW7Gr17pa y0k347Gw15Jws5J3yxXa12gw45KF93trW8ta1Ivw17J3y5CFy8ZrWSqFZ8AF1xJ3WxA34U Wa17Za4UZFy7G3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUaJPtUUUUU= X-Originating-IP: [180.105.150.230] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiYArO1Gd+dJ2aiAAAsS 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 0AAAD56721 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 0.93 X-Spam-Score: 0.93 X-TUID: e14DNp7MrXeG From: Feng Shu * gnu/packages/display-managers.scm (lightdm-tiny-greeter): New variable. (customize-lightdm-tiny-greeter): New variable. (gnu): Export customize-lightdm-tiny-greeter. Change-Id: I4c6d9df0fcc33179692c016bea5a45eaae3b029b Signed-off-by: Feng Shu --- gnu/packages/display-managers.scm | 109 +++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index cddd3f494f..b43f4ece28 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -65,7 +65,8 @@ (define-module (gnu packages display-managers) #:use-module (gnu packages qt) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xfce) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:export (customize-lightdm-tiny-greeter)) (define-public sddm (package @@ -592,6 +593,112 @@ (define-public lightdm-mini-greeter Display Manager and LightDM GTK3 Greeter.") (license license:gpl3)))) +(define-public lightdm-tiny-greeter + (let ((commit "6717c5853315ebd8164b1ddf85b9483f92cbcae8") + (revision "0")) + (package + (name "lightdm-tiny-greeter") + ;; Version 1.2 release in 2021, so we use a recent commit. + (version (git-version "1.2" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tobiohlala/lightdm-tiny-greeter") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1n970d6525fd918i1j09akxiacqbpxni8apkfi542bq5zg5crjbs")))) + (build-system glib-or-gtk-build-system) + (arguments + (list + #:tests? #f ; No test target. + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch-hardcoded-paths + (lambda _ + (substitute* "Makefile" + (("PREFIX = /usr") + (string-append "PREFIX = " #$output)) + (("/usr/share/xgreeters") + (string-append #$output "/share/xgreeters")) + (("cp lightdm-tiny-greeter") + "mkdir -p $(PREFIX)/bin; cp lightdm-tiny-greeter")))) + (add-after 'glib-or-gtk-wrap 'custom-wrap + (lambda _ + (wrap-script (string-append #$output "/bin/lightdm-tiny-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" = + (,(string-append + #$output + "/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 'fix-.desktop-file + (lambda _ + (substitute* (string-append + #$output "/share/xgreeters/lightdm-tiny-greeter.desktop") + (("Exec=lightdm-tiny-greeter") + (string-append "Exec=" + (string-append + #$output "/bin/lightdm-tiny-greeter"))))))))) + (native-inputs + (list autoconf automake pkg-config)) + (inputs + (list gtk+ guile-3.0 lightdm)) + (synopsis "Tiny Greeter for LightDM") + (home-page "https://github.com/tobiohlala/lightdm-tiny-greeter") + (description "A tiny yet customizable GTK3 LightDM Greeter +with focus on code and minimalism.") + (license license:bsd-3)))) + +(define* (customize-lightdm-tiny-greeter #:key name session + user_text pass_text + fontname fontsize) + "Make a customized lightdm-tiny-greeter package which name is NAME. + +This function will change SESSION, USER_TEXT, PASS_TEXT, FONTNAME and FONTSIZE +in config.h of lightdm-tiny-greeter." + (package + (inherit lightdm-tiny-greeter) + (name (or name (string-append + (package-name lightdm-tiny-greeter) + "-" (or session "default")))) + (arguments + (substitute-keyword-arguments + (package-arguments lightdm-tiny-greeter) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-config-h + (lambda _ + (when #$user_text + (substitute* "config.h" + (("\\*user_text = .*;") + (string-append "*user_text = \"" #$user_text "\";")))) + (when #$pass_text + (substitute* "config.h" + (("\\*pass_text = .*;") + (string-append "*pass_text = \"" #$pass_text "\";")))) + (when #$session + (substitute* "config.h" + (("\\*session = .*;") + (string-append "*session = \"" #$session "\";")))) + (when #$fontname + (substitute* "config.h" + (("font: .*px .*;") + (string-append "font: 16px \\\"" #$fontname "\\\";")))) + (when #$fontsize + (substitute* "config.h" + (("font: .*px") + (string-append "font: " #$fontsize "px")))))))))))) + (define-public slim (package (name "slim") -- 2.47.1