From patchwork Sat Sep 10 20:30:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 42455 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 9E4CB27BBEA; Sat, 10 Sep 2022 21:32:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 5E0B227BBE9 for ; Sat, 10 Sep 2022 21:32:13 +0100 (BST) Received: from localhost ([::1]:41702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX79A-0001N6-Ho for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 16:32:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX784-0001Dr-3u for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX782-00056t-OE for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX782-0004A9-Jb for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57721] [PATCH 1/4] gnu: Add rust-greetd-ipc-0.8. References: <20220910202903.17482-1-paren@disroot.org> In-Reply-To: <20220910202903.17482-1-paren@disroot.org> Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57721@debbugs.gnu.org Cc: "\(" Received: via spool by 57721-submit@debbugs.gnu.org id=B57721.166284184115946 (code B ref 57721); Sat, 10 Sep 2022 20:31:02 +0000 Received: (at 57721) by debbugs.gnu.org; 10 Sep 2022 20:30:41 +0000 Received: from localhost ([127.0.0.1]:40421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77g-000492-GL for submit@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:40 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77e-00048m-OI for 57721@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:39 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 9BB1841663; Sat, 10 Sep 2022 22:30:37 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2GOAsXR08KzM; Sat, 10 Sep 2022 22:30:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662841836; bh=9gxHPnsZJa+LdDcaMvNMK3N5+11B9TfHh+uZvFGg5zI=; h=From:To:Cc:Subject:Date; b=Myd+MjhuNKy/X3VIimfJVH51p9eUZEbmdc8QnRLyz0TVlQGuvkfH1WTc6v/1KzPjr 0Ea4wfw01hdn3C0COQpx6w/2L0vNGREOoQUJhnwrhkqr6ni0TS8dJ/aaEalaCzpHUB nBWRsr08vVJpOzOgvuWd7wOuKLCxjEUnJS8TPqyFwUiH79iWAN7Q2uJrjCCRyQagEV 41hTrYKIDPpVzlIEqlUr9mrx0cimJarqdbrq0PkhJQZ4gF+cWlKiPjHpHnbLaqTJkt LWCFizSmeo8ACE4fygAde7y3zkm25YGFwzWt0WV3Ag/ESQHFFJhg9XgocVNvbP5oyB 8hy7r/KmYP4Zw== Date: Sat, 10 Sep 2022 21:30:29 +0100 Message-Id: <20220910203032.17699-1-paren@disroot.org> Mime-Version: 1.0 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/crates-io.scm (rust-greetd-ipc-0.8): New variable. --- gnu/packages/crates-io.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 02f7bc7d4d..c7b971ffc2 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 Marius Bakke ;;; Copyright © 2022 Evgenii Lepikhin ;;; Copyright © 2022 Gabriel Arazas +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -26136,6 +26137,32 @@ (define-public rust-goblin-0.0 loading crate.") (license license:expat))) +(define-public rust-greetd-ipc-0.8 + (package + (name "rust-greetd-ipc") + (version "0.8.0") + (source (origin + (method url-fetch) + (uri (crate-uri "greetd-ipc" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1dscriv3adjyaxfaax3cmqrzx6q2vwwchbh86dhll783wjc4ivw0")))) + (build-system cargo-build-system) + (arguments + (list #:cargo-inputs + `(("rust-async-trait" ,rust-async-trait-0.1) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-tokio" ,rust-tokio-1)))) + (home-page "https://kl.wtf/projects/greetd") + (synopsis "@command{greetd} IPC protocol library for Rust") + (description + "This package provides library that helps you use the +@command{greetd} JSON-based IPC protocol from Rust.") + (license license:gpl3))) + (define-public rust-grep-0.2 (package (name "rust-grep") From patchwork Sat Sep 10 20:30:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 42456 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 08E2027BBEA; Sat, 10 Sep 2022 21:32:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 B9A3B27BBE9 for ; Sat, 10 Sep 2022 21:32:19 +0100 (BST) Received: from localhost ([::1]:46782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX79G-0001mY-V9 for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 16:32:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX784-0001Dq-5a for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX783-00056x-3y for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX782-0004AG-Vx for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57721] [PATCH 2/4] gnu: Add rust-os-pipe-0.8. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57721@debbugs.gnu.org Cc: "\(" Received: via spool by 57721-submit@debbugs.gnu.org id=B57721.166284184315957 (code B ref 57721); Sat, 10 Sep 2022 20:31:02 +0000 Received: (at 57721) by debbugs.gnu.org; 10 Sep 2022 20:30:43 +0000 Received: from localhost ([127.0.0.1]:40424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77j-00049H-0g for submit@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:43 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77f-00048o-59 for 57721@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:39 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 826DA4A01F; Sat, 10 Sep 2022 22:30:38 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j8vAsTyT3Ib2; Sat, 10 Sep 2022 22:30:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662841836; bh=juCQwbElWbmqmXiQivx3Yv4h73YCvzlTPdcpC5PJReg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ydsmq6IAuNBBmgD7YwvF0stvIxdazA/m7jQ+TTfqonHhrJF5qljX4huavaY84Ttj2 2bVD+z0vIUOUClGgxmSvGaRrJ0ncOt9SL0pYyaRrSpxuFigbPWWBZRkhwYrptT5lzI nV/fO6Re8nbOyTqjlBkiOSa4FlVb1TzJJRnC7t4nirQWUktcn+WxqBP7TAFA1SjaKR S/1zrZ+fnRIZH3ABw/3uSG9tLY6owXNo8JWj25DU1tJQKGG2hevHYMCrzJ2XcGQO9g e0gwiJYPEtx9Rop5dn76Dm9d0qGDPmps4M75V5CIwC6Bp641iZNS5MdDPrS4u2F/eC SX0tfyZY+NoRw== Date: Sat, 10 Sep 2022 21:30:30 +0100 Message-Id: <20220910203032.17699-2-paren@disroot.org> In-Reply-To: <20220910203032.17699-1-paren@disroot.org> References: <20220910203032.17699-1-paren@disroot.org> Mime-Version: 1.0 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/crates-io.scm (rust-os-pipe-0.8): New variable. --- gnu/packages/crates-io.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index c7b971ffc2..f1a84e9d22 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -40800,10 +40800,27 @@ (define-public rust-os-pipe-0.9 "04yjs1hf88jjm17g8a2lr7ibxyyg460rzbgcw9f1yzihq833y8zv")))) (native-inputs (list)))) -(define-public rust-os-pipe-0.5 +(define-public rust-os-pipe-0.8 (package (inherit rust-os-pipe-0.9) (name "rust-os-pipe") + (version "0.8.2") + (source (origin + (method url-fetch) + (uri (crate-uri "os-pipe" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "049ax8shxik7mm68r2nf7xnrcq3z3p7hz54sbrcxwywxqsjdzs41")))) + (arguments + (list #:cargo-inputs + `(("rust-nix" ,rust-nix-0.15) + ("rust-winapi" ,rust-winapi-0.3)))))) + +(define-public rust-os-pipe-0.5 + (package + (inherit rust-os-pipe-0.8) + (name "rust-os-pipe") (version "0.5.1") (source (origin From patchwork Sat Sep 10 20:30:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 42454 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 9A66027BBEA; Sat, 10 Sep 2022 21:32:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 98C4E27BBE9 for ; Sat, 10 Sep 2022 21:32:11 +0100 (BST) Received: from localhost ([::1]:42608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX798-0001HA-NU for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 16:32:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX784-0001Ds-4j for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX783-00057B-H9 for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX783-0004AO-Cm for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57721] [PATCH 3/4] gnu: Add wlgreet. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 20:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57721@debbugs.gnu.org Cc: "\(" Received: via spool by 57721-submit@debbugs.gnu.org id=B57721.166284184415963 (code B ref 57721); Sat, 10 Sep 2022 20:31:03 +0000 Received: (at 57721) by debbugs.gnu.org; 10 Sep 2022 20:30:44 +0000 Received: from localhost ([127.0.0.1]:40426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77j-00049K-F3 for submit@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:43 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77f-00048p-Jz for 57721@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:40 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id ECDEC49FE8; Sat, 10 Sep 2022 22:30:38 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bxClRDkEX276; Sat, 10 Sep 2022 22:30:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662841836; bh=b6IqmkhbmAX9/nNvFD/UbuMvQ9XAH9T0qh8+vFKL2ME=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iZw6WCFB74ZwL4PCf/qQ81kiJAO+2dJ0COMIoGDj3RcVtsYbrq0NGd5QhfTolDEUR v+o0LXFun1sTCjzORB5mHj7qfSu5CkJJg9mG2W2l+G8N5oC3mjuxL0cJ+Ajv4QuEQz EC/YoOUF9EaK9iTc7a6K0FmJtZEXhnvLLr0j+mUTDGub25TYUgZbeXxs05o52xtmXX D/j6Wl2bhamWXZfyqMzMhqV6sZhqhiw2zZdzXC7Drag0Jjr9MwQ6QzHrr2Q/SK/Ky1 KPV0VliFgLlW4O2Tiw9TKK92WO/6HHO9Ue8s4fJWFB6dhI4nQ4Lyf6D4rfKxkEFqNQ fn39pEmWG8I/Q== Date: Sat, 10 Sep 2022 21:30:31 +0100 Message-Id: <20220910203032.17699-3-paren@disroot.org> In-Reply-To: <20220910203032.17699-1-paren@disroot.org> References: <20220910203032.17699-1-paren@disroot.org> Mime-Version: 1.0 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (wlgreet): New variable. --- gnu/packages/admin.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 21f9176bfa..bf76d3bd30 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -51,6 +51,7 @@ ;;; Copyright © 2021 Artyom V. Poptsov ;;; Copyright © 2022 Wamm K. D. ;;; Copyright © 2022 Roman Riabenko +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,6 +98,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-graphics) #:use-module (gnu packages crates-io) #:use-module (gnu packages cross-base) #:use-module (gnu packages crypto) @@ -107,6 +109,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages elf) #:use-module (gnu packages file) #:use-module (gnu packages flex) + #:use-module (gnu packages fonts) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) @@ -5192,6 +5195,74 @@ (define-public greetd-pam-mount auto-(mounting/unmounting) of XDG_RUNTIME_DIR in the way that it will not interfere with default pam-mount configuration."))) +(define-public wlgreet + (package + (name "wlgreet") + (version "0.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~kennylevinsen/wlgreet") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00grp63n9nrgqls3knxfv9wjbc7p0jwr7i2vzxy750dz85gi2kzn")))) + (build-system cargo-build-system) + (arguments + (list #:cargo-inputs + `(("rust-chrono" ,rust-chrono-0.4) + ("rust-getopts" ,rust-getopts-0.2) + ("rust-greetd-ipc" ,rust-greetd-ipc-0.8) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-memmap2" ,rust-memmap2-0.3) + ("rust-nix" ,rust-nix-0.15) + ("rust-os-pipe" ,rust-os-pipe-0.8) + ("rust-rusttype" ,rust-rusttype-0.7) + ("rust-serde" ,rust-serde-1) + ("rust-smithay-client-toolkit" + ,rust-smithay-client-toolkit-0.15) + ("rust-toml" ,rust-toml-0.5) + ("rust-wayland-client" ,rust-wayland-client-0.29) + ("rust-wayland-protocols" ,rust-wayland-protocols-0.29) + ("rust-xml-rs" ,rust-xml-rs-0.8)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-bundled-fonts + (lambda _ + (delete-file-recursively "fonts"))) + (add-after 'remove-bundled-fonts 'fix-font-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/draw.rs" + (("\\.\\./fonts/dejavu/DejaVuSansMono\\.ttf" _) + (search-input-file + inputs + "share/fonts/truetype/DejaVuSansMono.ttf")) + (("\\.\\./fonts/Roboto-Regular\\.ttf" _) + (search-input-file + inputs + "share/fonts/truetype/Roboto-Regular.ttf"))))) + (add-after 'configure 'fix-library-references + (lambda* (#:key inputs vendor-dir #:allow-other-keys) + (substitute* (find-files vendor-dir "\\.rs$") + (("lib(wayland-.*|xkbcommon)\\.so" so-file) + (search-input-file + inputs + (string-append "lib/" so-file))))))))) + (inputs + (list font-dejavu + font-google-roboto + libxkbcommon + wayland)) + (home-page "https://git.sr.ht/~kennylevinsen/wlgreet") + (synopsis "Bare-bones Wayland-based greeter for @command{greetd}") + (description + "@command{wlgreet} provides a @command{greetd} greeter +that runs on a Wayland compositor such as @command{sway}. It +is implemented with pure Wayland APIs, so it does not depend +on a GUI toolkit.") + (license license:gpl3))) + (define-public libseat (package (name "libseat") From patchwork Sat Sep 10 20:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 42453 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 8BC6D27BBEC; Sat, 10 Sep 2022 21:32:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 9D1BD27BBE9 for ; Sat, 10 Sep 2022 21:32:10 +0100 (BST) Received: from localhost ([::1]:42606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX797-0001FJ-OF for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 16:32:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX784-0001Dt-A3 for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX784-00057N-0B for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX783-0004AV-Rn for guix-patches@gnu.org; Sat, 10 Sep 2022 16:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57721] [PATCH 4/4] gnu: base: Add greetd-wlgreet-sway-session. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 20:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57721@debbugs.gnu.org Cc: "\(" Received: via spool by 57721-submit@debbugs.gnu.org id=B57721.166284184815980 (code B ref 57721); Sat, 10 Sep 2022 20:31:03 +0000 Received: (at 57721) by debbugs.gnu.org; 10 Sep 2022 20:30:48 +0000 Received: from localhost ([127.0.0.1]:40428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77o-00049g-0a for submit@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:48 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX77g-000491-JQ for 57721@debbugs.gnu.org; Sat, 10 Sep 2022 16:30:44 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id EB11341663; Sat, 10 Sep 2022 22:30:39 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MlnIYjas7IWf; Sat, 10 Sep 2022 22:30:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662841836; bh=fbyjRm10NslwDSgr2z0pbFATbkKg4Y2uLjcrw1nMV7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XYdWSYJ9tzbaqOLT2f6JLUK5OzhS20w/Q/5DJ1hh/+XfjabuywjlwISOYubBZDJ9p 1+ctagdUQhgdgc/39GCD0oAwAQDpEzz+pBZxClJP/7q8edtCPYvzpsFQZPkPI5XNq6 V0OUE81cbW6zu+86lV391UkhFrTaEpfMYDKvR4U8dc1DJdBVt/Bp8irlSAIjRuGo1I 0DZ054kSI2VHPwIICidCmE9kKYLK1Iw8ZOZGoqarGCauJ6degBPb1d5dNsuNl03uBI MazRLKPF3fkJevmZ5ZMZiigfpnfx0RLX8uO42wYHWAQ0wvVm1THpUqDNeQSj071wk1 ue7T5cg6QHdAQ== Date: Sat, 10 Sep 2022 21:30:32 +0100 Message-Id: <20220910203032.17699-4-paren@disroot.org> In-Reply-To: <20220910203032.17699-1-paren@disroot.org> References: <20220910203032.17699-1-paren@disroot.org> Mime-Version: 1.0 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/services/base.scm (greetd-wlgreet-session): New data type. (greetd-wlgreet-sway-session): Likewise. * doc/guix.texi ("Base Services")[greetd-service-type]: Document them. --- doc/guix.texi | 76 ++++++++++++++++++++++++++ gnu/services/base.scm | 122 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index c21235f28d..cf66014d8e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -106,6 +106,7 @@ Copyright @copyright{} 2022 Philip M@sup{c}Grath@* Copyright @copyright{} 2022 Karl Hallsby@* Copyright @copyright{} 2022 Justin Veilleux@* Copyright @copyright{} 2022 Reily Siegel@* +Copyright @copyright{} 2022 (@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -18633,6 +18634,81 @@ are set right after mentioned variables, so that they can be overriden. @end table @end deftp +@deftp {Data Type} greetd-wlgreet-session +Generic configuration record for the wlgreet greetd greeter. + +@table @asis +@item @code{wlgreet} (default: @code{wlgreet}) +The package with the @command{/bin/wlgreet} command. + +@item @code{command} (default: @code{(file-append sway "/bin/sway")}) +Command to be started by @command{/bin/wlgreet} on successful login. + +@item @code{command-args} (default: @code{'()}) +Command arguments to pass to command. + +@item @code{output-mode} (default: @code{"all"}) +Option to use for @code{outputMode} in the TOML configuration file. + +@item @code{scale} (default: @code{1}) +Option to use for @code{scale} in the TOML configuration file. + +@item @code{background} (default: @code{(list 0 0 0 0.9)}) +RGBA list to use as the background colour of the login prompt. + +@item @code{headline} (default: @code{(list 1 1 1 1)}) +RGBA list to use as the headline colour of the UI popup. + +@item @code{prompt} (default: @code{(list 1 1 1 1)}) +RGBA list to use as the prompt colour of the UI popup. + +@item @code{prompt-error} (default: @code{(list 1 1 1 1)}) +RGBA list to use as the error colour of the UI popup. + +@item @code{border} (default: @code{(list 1 1 1 1)}) +RGBA list to use as the border colour of the UI popup. + +@item @code{extra-env} (default: @code{'()}) +Extra environment variables to set on login. + +@end table +@end deftp + +@deftp {Data Type} greetd-wlgreet-sway-session +Sway-specific configuration record for the wlgreet greetd greeter. + +@table +@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)}) +A @code{greetd-wlgreet-session} record for generic wlgreet configuration, +on top of the Sway-specific @code{greetd-wlgreet-sway-session}. + +@item @code{sway} (default: @code{sway}) +The package providing the @command{/bin/sway} command. + +@item @code{sway-configuration} (default: #f) +File-like object providing an additional Sway configuration file to be +prepended to the mandatory part of the configuration. + +@end table + +Here is an example of a greetd configuration that uses wlgreet and Sway: + +@lisp + (greetd-configuration + ;; We need to give the greeter user these permissions, otherwise + ;; Sway will crash on launch. + (greeter-supplementary-groups (list "video" "input" "seat")) + (terminals + (list (greetd-terminal-configuration + (terminal-vt "1") + (terminal-switch #t) + (default-session-command + (greetd-wlgreet-sway-session + (sway-configuration + (local-file "sway-greetd.conf")))))))) +@end lisp +@end deftp + @node Scheduled Job Execution @subsection Scheduled Job Execution diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 616bc42e69..5de4e0a51a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2021 muradm ;;; Copyright © 2022 Guillaume Le Vaillant ;;; Copyright © 2022 Justin Veilleux +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ (define-module (gnu services base) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) #:use-module (gnu packages terminals) + #:use-module ((gnu packages wm) #:select (sway)) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask swap-space->flags-bit-mask)) @@ -231,6 +233,8 @@ (define-module (gnu services base) greetd-configuration greetd-terminal-configuration greetd-agreety-session + greetd-wlgreet-session + greetd-wlgreet-sway-session %base-services)) @@ -2869,6 +2873,122 @@ (define (make-greetd-agreety-session-command config command) "agreety-command" #~(execl #$agreety #$agreety "-c" #$command)))) +(define-record-type* + greetd-wlgreet-session make-greetd-wlgreet-session + greetd-wlgreet-session? + (wlgreet greetd-wlgreet (default wlgreet)) + (command greetd-wlgreet-command + (default (file-append sway "/bin/sway"))) + (command-args greetd-wlgreet-command-args (default #~(list))) + (output-mode greetd-wlgreet-output-mode (default "all")) + (scale greetd-wlgreet-scale (default 1)) + (background greetd-wlgreet-background (default (list 0 0 0 0.9))) + (headline greetd-wlgreet-headline (default (list 1 1 1 1))) + (prompt greetd-wlgreet-prompt (default (list 1 1 1 1))) + (prompt-error greetd-wlgreet-prompt-error (default (list 1 1 1 1))) + (border greetd-wlgreet-border (default (list 1 1 1 1))) + (extra-env greetd-wlgreet-extra-env (default #~(list)))) + +(define (greetd-wlgreet-wayland-session-command session) + (program-file "wlgreet-session-command" + #~(let* ((username (getenv "USER")) + (useruid (number->string + (passwd:uid (getpwuid username)))) + (command #$(greetd-wlgreet-command session))) + (use-modules + (ice-9 format) + (ice-9 match)) + (setenv "XDG_SESSION_TYPE" "wayland") + (setenv "XDG_RUNTIME_DIR" + (string-append "/run/user/" useruid)) + (for-each (match-lambda + ((var . val) + (setenv var val))) + #$(greetd-wlgreet-extra-env session)) + (apply execl command command + #$(greetd-wlgreet-command-args session))))) + +(define (make-wlgreet-config-color section-name color) + (match color + ((red green blue opacity) + (string-append + "[" section-name "]\n" + "red = " (number->string red) "\n" + "green = " (number->string green) "\n" + "blue = " (number->string blue) "\n" + "opacity = " (number->string opacity) "\n")))) + +(define (make-wlgreet-configuration-file session) + (let ((command (greetd-wlgreet-wayland-session-command session)) + (output-mode (greetd-wlgreet-output-mode session)) + (scale (greetd-wlgreet-scale session)) + (background (greetd-wlgreet-background session)) + (headline (greetd-wlgreet-headline session)) + (prompt (greetd-wlgreet-prompt session)) + (prompt-error (greetd-wlgreet-prompt-error session)) + (border (greetd-wlgreet-border session))) + (mixed-text-file "wlgreet.toml" + "command = \"" command "\"\n" + "outputMode = \"" output-mode "\"\n" + "scale = " (number->string scale) "\n" + (apply string-append + (map (match-lambda + ((section-name . color) + (make-wlgreet-config-color section-name color))) + `(("background" . ,background) + ("headline" . ,headline) + ("prompt" . ,prompt) + ("prompt-error" . ,prompt-error) + ("border" . ,border))))))) + +(define-record-type* + greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session + greetd-wlgreet-sway-session? + (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session ; + (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like + (default #f))) + +(define (make-wlgreet-sway-configuration-file session) + (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session)) + (wlgreet-config (make-wlgreet-configuration-file wlgreet-session)) + (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet")) + (sway-config (greetd-wlgreet-sway-session-sway-configuration session)) + (swaymsg (file-append (greetd-wlgreet-sway-session-sway session) + "/bin/swaymsg"))) + (mixed-text-file "wlgreet-sway.conf" + (if sway-config + #~(string-append "include " #$sway-config "\n") + "") + "xwayland disable\n" + "exec \"" wlgreet " --config " wlgreet-config "; " + swaymsg " exit\"\n"))) + +(define (greetd-wlgreet-sway-session-command session) + (program-file "wlgreet-sway-session-command" + #~(let* ((sway #$(file-append (greetd-wlgreet-sway-session-sway session) + "/bin/sway")) + (config #$(make-wlgreet-sway-configuration-file session)) + (log-file (open-output-file + (string-append "/tmp/sway-greeter." + (number->string (getpid)) + ".log"))) + (username (getenv "USER")) + (useruid (number->string (passwd:uid (getpwuid username))))) + + ;; redirect stdout/err to log-file + (dup2 (fileno log-file) 1) + (dup2 1 2) + + ;; XXX: If we start sway immediately, it won't find seatd for some + ;; reason... + (sleep 1) + + (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)) + (execl sway sway "-d" "-c" config)))) + + (define (make-greetd-default-session-command config-or-command) (cond ((greetd-agreety-session? config-or-command) (cond ((greetd-agreety-xdg-env? config-or-command) @@ -2879,6 +2999,8 @@ (define (make-greetd-default-session-command config-or-command) (make-greetd-agreety-session-command config-or-command (greetd-agreety-tty-session-command config-or-command))))) + ((greetd-wlgreet-sway-session? config-or-command) + (greetd-wlgreet-sway-session-command config-or-command)) (#t config-or-command))) (define-record-type*