From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>, 57952@debbugs.gnu.org
Subject: [bug#57952] [PATCH] gnu: Add guix-send-email.
Date: Tue, 20 Sep 2022 18:51:55 +0200 [thread overview]
Message-ID: <31828e626a855e938772534226f7104b921bb6ec.camel@gmail.com> (raw)
In-Reply-To: <19f63e3d16273f9d43f61890b0c8472afaa75d3f.1663668015.git.efraim@flashner.co.il>
Am Dienstag, dem 20.09.2022 um 13:00 +0300 schrieb Efraim Flashner:
> * gnu/packages/guix-extensions.scm (guix-send-email): New variable.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix-extensions.
Probably unnecessary file; gwl lives nice in package-management.
> ---
> gnu/local.mk | 1 +
> gnu/packages/guix-extensions.scm | 62
> ++++++++++++++++++++++++++++++++
> 2 files changed, 63 insertions(+)
> create mode 100644 gnu/packages/guix-extensions.scm
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 238fb72bc5..ba28788776 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -295,6 +295,7 @@ GNU_SYSTEM_MODULES
> = \
> %D%/packages/guile.scm \
> %D%/packages/guile-wm.scm \
> %D%/packages/guile-xyz.scm \
> + %D%/packages/guix-extensions.scm \
> %D%/packages/gv.scm \
> %D%/packages/gxmessage.scm \
> %D%/packages/hardware.scm \
> diff --git a/gnu/packages/guix-extensions.scm b/gnu/packages/guix-
> extensions.scm
> new file mode 100644
> index 0000000000..bb23b59de4
> --- /dev/null
> +++ b/gnu/packages/guix-extensions.scm
> @@ -0,0 +1,62 @@
> +;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify
> it
> +;;; under the terms of the GNU General Public License as published
> by
> +;;; the Free Software Foundation; either version 3 of the License,
> or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public
> License
> +;;; along with GNU Guix. If not, see
> <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu packages guix-extensions)
> + #:use-module ((guix licenses) #:prefix license:)
> + #:use-module (guix gexp)
> + #:use-module (guix packages)
> + #:use-module (guix build-system trivial)
> + #:use-module (gnu packages version-control))
> +
> +(define-public guix-send-email
> + (package
> + (name "guix-send-email")
> + (version "0")
> + (source #f)
> + (build-system trivial-build-system)
> + (arguments
> + (list
> + #:modules '((guix build utils))
> + #:builder
> + #~(begin
> + (use-modules (guix build utils))
> + (let ((dest (string-append #$output
> + "/share/guix/extensions/send-
> email.scm"))
> + (git #$(this-package-input "git"))
> + (git-send-email (assoc-ref %build-inputs "git:send-
> email")))
> + (mkdir-p (dirname dest))
> + (with-output-to-file dest
> + (lambda ()
> + (format #t
> +"(define-module (guix extensions send-email)~@
> + #:use-module (guix scripts)~@
> + #:export (guix-send-email))~@
> +~@
> +(define-command (guix-send-email . args)~@
> + (category extension)~@
> + (synopsis \"Replace 'guix send-email' with 'git
> send-email'\")~@
> + (setenv \"GIT_EXEC_PATH\" \"~a/libexec/git-core\")~@
> + (apply system* \"~a/bin/git\" \"send-email\"
> args))~%"
> + git-send-email git)))))))
> + (home-page "") ; Should be documentation location for
> GUIX_EXTENSIONS_PATH
> + (inputs
> + `(("git" ,git)
> + ("git:send-email" ,git "send-email")))
> + (synopsis "Replace @code{guix send-email} with @code{git send-
> email}")
> + (description "This Guix extension provides a shell redirect from
> @code{guix
> +send-email} to @code{git send-email}.")
> + ;; The package definition is longer than the code;
> + ;; let this serve as the declaration of the license.
> + (license license:gpl3+)))
I don't think this is a useful tool to provide at all nor a useful way
of providing it. For one, I think users of "guix send-email" (which
for the record should probably be guix git send-email analogous to our
other git extensions) would like to have some features from
etc/teams.scm incorporated into them rather than having a wrapper that
simply performs the same operation. For the other, the implementation
takes up more place in Guix than defining the actual command internally
would. Thus, I doubt whether the design choices made here were wise
ones.
Cheers
next prev parent reply other threads:[~2022-09-20 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 10:00 [bug#57952] [PATCH] gnu: Add guix-send-email Efraim Flashner
2022-09-20 16:51 ` Liliana Marie Prikler [this message]
2022-09-21 10:02 ` Efraim Flashner
2022-09-21 16:56 ` Liliana Marie Prikler
2022-09-21 21:19 ` zimoun
2022-09-21 21:16 ` zimoun
2022-09-20 17:38 ` zimoun
2022-09-21 10:03 ` Efraim Flashner
2022-09-22 19:30 ` Maxime Devos
2022-09-28 20:45 ` Ludovic Courtès
2022-09-30 10:39 ` bug#57952: Close patch Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31828e626a855e938772534226f7104b921bb6ec.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=57952@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).