From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kDmyKRMKFWHNmQAAgWs5BA (envelope-from ) for ; Thu, 12 Aug 2021 13:46:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ElV+JRMKFWFJcgAAB5/wlQ (envelope-from ) for ; Thu, 12 Aug 2021 11:46:27 +0000 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 C144225F4A for ; Thu, 12 Aug 2021 13:46:26 +0200 (CEST) Received: from localhost ([::1]:41998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mE9AB-0004vM-Lm for larch@yhetil.org; Thu, 12 Aug 2021 07:46:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mE99u-0004up-La for guix-patches@gnu.org; Thu, 12 Aug 2021 07:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mE99t-0005ga-Vb for guix-patches@gnu.org; Thu, 12 Aug 2021 07:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mE99t-000769-NO for guix-patches@gnu.org; Thu, 12 Aug 2021 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v2 3/7] gnu: freedesktop: Add greetd 0.7.0 Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 12 Aug 2021 11:46: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: muradm Cc: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.162876874827262 (code B ref 49969); Thu, 12 Aug 2021 11:46:01 +0000 Received: (at 49969) by debbugs.gnu.org; 12 Aug 2021 11:45:48 +0000 Received: from localhost ([127.0.0.1]:37709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mE99a-00075Y-Cp for submit@debbugs.gnu.org; Thu, 12 Aug 2021 07:45:48 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:60414 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mE99U-00075H-W1 for 49969@debbugs.gnu.org; Thu, 12 Aug 2021 07:45:41 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628768726; bh=zp977slDqrzJCYy+jJPvbKt9W1xQJ66ViZFE3jORWlk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=mvRpKDb4g8V8EVq7k/kniRe8sgfDO8haOAFZeKMsDBk5fpr4HuWAn2uJW+0KX0vIh VqKLH32chbUD3pwoaUTHSJA9K20PWbi7sDEWZyObmBRUW0KS9ykhLNOSO09d6ItQ1r g6U3ApVf5OELKpd/4g0GQqlilTm2cN10jHSrUKps= In-Reply-To: <87k0kr68u7.fsf@muradm.net> References: <20210810193626.9186-1-mail@muradm.net> <20210810200756.9581-3-mail@muradm.net> <87im0c1app.fsf@yoctocell.xyz> <87k0kr68u7.fsf@muradm.net> Date: Thu, 12 Aug 2021 13:45:25 +0200 Message-ID: <8735rej38q.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628768787; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=m5gqP0TOZa7oUecITrHsNf7RD5uQtjHPi+5VC6F/5f8=; b=ICvMV9TN4SxKur5Wo+qOOfV38aaMx5YDPdIrEyDFxb2JeYu8XO1LUZ9dTIIm7EuBa3eLc9 6PNgBp1W4otne2ohsPAYOG/LlMKapSamRgq5tQ9/jvHrcvHkpdChI0k3kDlDQ0RsDqHZvF 67ZZtNWaKE5UVRIKmYoIP4WHxn/pzaHig2yz3+a2sYSnakzZDq/wCexrqJairFvWaV0ETm nei4OTQAedlIo6ByLeEZH7fmUjd3AJgISmNzjWLRrr1gTjUCIyHNGt6+IFPoRTCehsZh1e KemjFp3751KZrjtQTlQToH5g47noAbQJuVzECB3MUeikZmgVre/ZGReWJEisdA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628768787; a=rsa-sha256; cv=none; b=uWYFM7jDjmJaIY0ojFsoxnuRSasV2lgKey+9PFN8ROTdYhI34eV3BQCjCX6KqpxEc2h4Zb rD3oPLmKtMdhbz2LpmgAgNcnmcVxu5mQgU5npfu39YOcbcrGlnd3cGXU2kqCeXqgLKl2I9 mvM+UCdBQc6BBmlheEV9md0adW0LMxzECel7NgL16UbaaIOnRAnDf/bSzz6STrBysLvJhA ngQvrfd2wqiWYoa15SUNU3BHqjLMZDcdfPuuRI6nfOhr1gpJvwXlMo0qUMQbuZ0zVNPHBR nOc558MsN+bYIc98DVpHAGpbMNUZTWQzQfWRgdh7P7KEAQwdxBmD69gdf38gFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=mvRpKDb4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=mvRpKDb4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C144225F4A X-Spam-Score: -1.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: r9Z7GNN37wpR --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 11 2021, muradm wrote: > Xinglu Chen writes: > >> On Tue, Aug 10 2021, muradm wrote: >> >>> * gnu/packages/freedesktop.scm (greetd): Add greetd 0.7.0 >>> --- >>> gnu/packages/freedesktop.scm | 80=20 >>> ++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 80 insertions(+) >>> >>> diff --git a/gnu/packages/freedesktop.scm=20 >>> b/gnu/packages/freedesktop.scm >>> index 693a79c738..631d36e765 100644 >>> --- a/gnu/packages/freedesktop.scm >>> +++ b/gnu/packages/freedesktop.scm >>> @@ -24,6 +24,7 @@ >>> ;;; Copyright =C2=A9 2020 Raghav Gururajan=20 >>> >>> ;;; Copyright =C2=A9 2021 Brendan Tildesley >>> ;;; Copyright =C2=A9 2021 pineapples >>> +;;; Copyright =C2=A9 2021 muradm >>> ;;; >>> ;;; This file is part of GNU Guix. >>> ;;; >>> @@ -46,6 +47,7 @@ >>> #:use-module (guix packages) >>> #:use-module (guix download) >>> #:use-module (guix git-download) >>> + #:use-module (guix build-system cargo) >>> #:use-module (guix build-system cmake) >>> #:use-module (guix build-system gnu) >>> #:use-module (guix build-system meson) >>> @@ -62,6 +64,7 @@ >>> #:use-module (gnu packages check) >>> #:use-module (gnu packages cmake) >>> #:use-module (gnu packages compression) >>> + #:use-module (gnu packages crates-io) >>> #:use-module (gnu packages cryptsetup) >>> #:use-module (gnu packages databases) >>> #:use-module (gnu packages disk) >>> @@ -862,6 +865,83 @@ that require it. It also provides a=20 >>> universal seat management library that >>> allows applications to use whatever seat management is=20 >>> available.") >>> (license license:expat))) >>> >>> +(define-public greetd >>> + (package >>> + (name "greetd") >>> + (version "0.7.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=20 >>> "0lmwr5ld9x2wlq00i7mjgm9by8zndiq9girj8g93k0kww9zbgr3g")))) >>> + (build-system cargo-build-system) >>> + (arguments >>> + `(#:cargo-inputs >>> + (("rust-nix" ,rust-nix-0.17) >>> + ("rust-pam-sys" ,rust-pam-sys-0.5.6) >>> + ("rust-rpassword" ,rust-rpassword-4) >>> + ("rust-users" ,rust-users-0.9) >>> + ("rust-serde" ,rust-serde-1) >>> + ("rust-serde-json" ,rust-serde-json-1) >>> + ("rust-libc" ,rust-libc-0.2) >>> + ("rust-tokio" ,rust-tokio-0.2) >>> + ("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 >>> + ;; once https://todo.sr.ht/~kennylevinsen/greetd/25 >>> + ;; is solved, below patch can be removed >>> + (add-after 'unpack 'patch-terminal-switch >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (substitute* "greetd/src/server.rs" >>> + (("switch: true,") >>> + "switch: false,")))) >>> + (delete 'package) >>> + (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=20 >>> "/greetd")) >>> + (agreety-bin (string-append release=20 >>> "/agreety"))) >>> + (install-file greetd-bin sbin) >>> + (install-file agreety-bin bin) >>> + (mkdir-p man1) >>> + (mkdir-p man5) >>> + (mkdir-p man7) >> >> No need to =E2=80=98mkdir-p=E2=80=99 if you will call =E2=80=98install-f= ile=E2=80=99 on the=20 >> directory. >> > > Didn't work for me, without it I get: > In procedure copy-file: No such file or directory Hmm, weird, the docs for =E2=80=98install-file=E2=80=99 says -- Scheme Procedure: install-file FILE DIRECTORY Create DIRECTORY if it does not exist and copy FILE in there under the same name. >>> + (with-directory-excursion "man" >>> + (system "scdoc < greetd-1.scd > greetd.1") >>> + (system "scdoc < greetd-5.scd > greetd.5") >>> + (system "scdoc < greetd-ipc-7.scd >=20 >>> greetd-ipc.7") >>> + (system "scdoc < agreety-1.scd > agreety.1")) >>> + (install-file "man/greetd.1" man1) >>> + (install-file "man/greetd.5" man5) >>> + (install-file "man/greetd-ipc.7" man7) >>> + (install-file "man/agreety.1" man1) >> >> Why not put these four lines inside the=20 >> (with-directory-excursion "man" >> =E2=80=A6) form, and remove the "man" prefix? >> > > Refactored, scdoc moved to 'build-man-pages after 'build, install=20 > minimized > > (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=20 > "/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)))))))) > > Noted for next update, thanks The phases LGTM! >>> + (description >>> + "greetd is a minimal and flexible login manager daemon >>> +that makes no assumptions about what you want to launch.") >> >> =E2=80=9Cwhat you want to launch=E2=80=9D sounds a bit vague, is it refe= rring to=20 >> desktop >> environment, window manager, or something else? > > As description says anything, it is from official documentation.=20 > Launches any thing, > could be DE, WM, Emacs, top etc. literally any thing :) Ah, OK, then maybe =E2=80=9Cwhat program=E2=80=9D instead of just =E2=80=9C= what=E2=80=9D? Someone might try to launch a missile with it ;-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEVCdUVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5T8gP/2WB5hJuPYczu+Svb8oiRP44rUfZ EdCjnAlz52c80pU2ljB/gS+lr0s5bZrgzgA9DFVUP+4OpPqH4b4+CY5FqzcciXEK cDT8uGQVuZWvoOH5jUm2gLx9tmf+TptGZrTxJkuJzuMBAg1mi8wgFYPoiEH8S3Qt YkdxSr3bTPOk/hMgo0yL4SWiqzDlqN3btldNPbimWWT8/tNFowsKySUN96KXH5bl L+q7JLbNsd7LzWrB95m/CXXG6L+D9dlmhQby5vlbrQeMDOFHbqfSRr2mrD00AcKP SNHcZ/8RKLOrklBOq1wFcPQQhLZ/F5rh+WPM6CQm+Xz+NxxHAenPA+z7BihvlS/Q ipde6EOfE6xd6p07vurAzGbhCgBpC+YpmUgTT5E5AQ6f/kWBeeXHue7zyOAqRdap bEmIUcoEa40voKQLbQ8o/pFBgRzWfvsoM6OUnM+Nn6OCL5uY8FkYCchpBI/D34SG r62sqgCjVg/tzVvzmtoFg5Su4S42j2+zIgV4qGdnUwpaXmfU/JzmaXm/+KLMTFs8 Q6GncMLdGXeh38jXzu7t0BqVg1p2qJ3kWwajuhUeGyLmbfWiTZt0J29l+14C4vYb V0e1woHuCIcpbzfpy3tm5GCotct2ut2ufayrDqXzgxZh7XyR1Ao/8EX/e4anCT0s g5+FfpBxyAvvTpFe =FG85 -----END PGP SIGNATURE----- --=-=-=--