From patchwork Mon Jun 13 14:45:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39947 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 38EC027BBEA; Mon, 13 Jun 2022 15:47:47 +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 8E31927BBE9 for ; Mon, 13 Jun 2022 15:47:46 +0100 (BST) Received: from localhost ([::1]:46786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lM1-00012C-Mi for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:47:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLL-00010e-GZ for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLJ-0001Zj-VT for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLJ-0006uk-Sc for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 3/8] gnu: admin: Add greetd 0.8.0. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 14:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165513156323639 (code B ref 49969); Mon, 13 Jun 2022 14:47:01 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:03 +0000 Received: from localhost ([127.0.0.1]:60076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKI-00065b-Cr for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:03 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43534 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKC-00061A-0m for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:53 -0400 Received: from localhost ([127.0.0.1]:35056) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI2-0003jK-Jx for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RozKN4irD+c6HlJfAmqLSZkvFzhfWCbNGOZYmXWR0n0=; b=RfXT6/3MzYIyy1ZJShHWKQ/ehE IUHwt+PsMbrHgyQI5m44+6uWqYdjRDkQ/6zpe0E4Xke8M8LAAHOs5BcJkKG+V3y0WMi4BwuFtP3sH ckuCcNlAarPU23d930GkbnfSkOV30ltX3vInhgORvumDh6vx5OCAvACXfYqoqkWpWT8xafftVB2h9 30v/7ZFP+raxxE8ytRI/Eaqma9Irj/4vepBVFUiN1b7lMLBW4vJX1TdDKJcjp1vXVeMG9aILieb+v KqKCnwLKrKlGIP8fD1kB0f0n/j+ceWEV1vQMV6OmH+q2IT49DrAtCbDZfeucassEyrt7KyszaVZqh C9VTCLjkcvzFPVa6Lh5nxWvz86KsXBQITQ26GnzuTUD6pRvZb9Mm/4aPyu12Mirn+fMjxpOT7feT2 SMAcJR0NOJ5OWX/TywvjnqyOGJu/ryHuO0L2zcHBA2ZKndCQqb4UKrGO4PFtcxjHq0JMyzE8K5wyV c809yYnzpziXPKf1yqLrIvr/; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKA-0002wy-BY for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:50 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:41 +0300 Message-Id: <20220613144546.11306-4-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-1-mail@muradm.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (greetd): New variable --- gnu/packages/admin.scm | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 6acfff8881..73d70744e1 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -45,6 +45,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 muradm ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Artyom V. Poptsov ;;; Copyright © 2022 Wamm K. D. @@ -66,6 +67,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages admin) + #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system emacs) #:use-module (guix build-system glib-or-gtk) @@ -93,6 +95,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-io) #:use-module (gnu packages cross-base) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) @@ -4987,4 +4990,78 @@ (define-public udpcast (home-page "https://www.udpcast.linux.lu") (license license:gpl2+))) +(define-public greetd + (package + (name "greetd") + (version "0.8.0") + (home-page "https://git.sr.ht/~kennylevinsen/greetd") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x5c3jkw09kvj2grcxm899y2n6ws8p990cyp9cs0fy6lm4fzlh6v")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-nix" ,rust-nix-0.19) + ("rust-pam-sys" ,rust-pam-sys-0.5) + ("rust-rpassword" ,rust-rpassword-5) + ("rust-users" ,rust-users-0.11) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-tokio" ,rust-tokio-1) + ("rust-getopts" ,rust-getopts-0.2) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-async-trait" ,rust-async-trait-0.1) + ("rust-enquote" ,rust-enquote-1)) + #:phases + (modify-phases %standard-phases + (delete 'package) + (add-after 'build 'build-man-pages + (lambda* (#:key inputs #:allow-other-keys) + (define (scdoc-cmd doc lvl) + (system (string-append "scdoc < " + doc "-" lvl ".scd > " + doc "." lvl))) + (with-directory-excursion "man" + (scdoc-cmd "greetd" "1") + (scdoc-cmd "greetd" "5") + (scdoc-cmd "greetd-ipc" "7") + (scdoc-cmd "agreety" "1")))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (sbin (string-append out "/sbin")) + (share (string-append out "/share")) + (man (string-append share "/man")) + (man1 (string-append man "/man1")) + (man5 (string-append man "/man5")) + (man7 (string-append man "/man7")) + (release "target/release") + (greetd-bin (string-append release "/greetd")) + (agreety-bin (string-append release "/agreety"))) + (install-file greetd-bin sbin) + (install-file agreety-bin bin) + (with-directory-excursion "man" + (install-file "greetd.1" man1) + (install-file "greetd.5" man5) + (install-file "greetd-ipc.7" man7) + (install-file "agreety.1" man1)))))))) + (native-inputs + `(("linux-pam" ,linux-pam) + ("scdoc" ,scdoc))) + (synopsis "minimal and flexible login manager daemon") + (description + "greetd is a minimal and flexible login manager daemon +that makes no assumptions about what you want to launch. +If you can run it from your shell in a TTY, greetd can start it. + +If it can be taught to speak a simple JSON-based IPC protocol, +then it can be a greeter.") + (license license:gpl3+)))