guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#44625] [PATCH] gnu: Add b4.


From: Kyle Meyer
Subject: [bug#44625] [PATCH] gnu: Add b4.
Date: Fri, 13 Nov 2020 19:39:06 -0500

* gnu/packages/version-control.scm (b4): New variable.
---

  b4 is focused on lore.kernel.org public-inbox archives, but it's useful for
  any public-inbox [1] instance, including yhetil.org/guix-patches :).  Here's
  an example with a recent multi-patch thread that involves multiple versions.

    $ # in the guix repo
    $ git config b4.attestation-policy off
    $ git config b4.midmask https://yhetil.org/guix-patches/%s
    $ b4 am 20201028165112.28575-1-zimon.toutoune@gmail.com

  The end result is a filtered mbox with the v2 patches.  Also, because the
  sender helpfully included the base commit, `b4 am' will use that information
  in the instructions that it outputs.

  If the above sounds useful to you but you'd prefer to work in Emacs, you
  might be interested in piem (<https://git.kyleam.com/piem/about/>), which
  includes a transient (i.e magit-popup's successor) interface to b4.

  [1] https://public-inbox.org/

 gnu/packages/version-control.scm | 41 ++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 16c70bd1a7..de7c961cea 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2301,6 +2301,47 @@ (define-public grokmirror
 based on a manifest file published by servers.")
     (license license:gpl3+)))
 
+(define-public b4
+  (package
+    (name "b4")
+    (version "0.5.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.kernel.org/pub/scm/utils/b4/b4.git";)
+             (commit (string-append "v" version))))
+       (file-name (string-append name "-" version "-checkout"))
+       (sha256
+        (base32 "1w11fiyspyncz2m7njrjfylgzch4azi7560ngd8i733wvjjhg3mj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f                      ; No tests.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-manpages
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((man (string-append (assoc-ref outputs "out")
+                                       "/man/man5/")))
+               (mkdir-p man)
+               (for-each (lambda (file) (install-file file man))
+                         (find-files "man" "\\.[1-8]$")))
+             #t)))))
+    (inputs
+     `(("python-requests" ,python-requests)))
+    (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git";)
+    (synopsis "Tool for working with patches in public-inbox archives")
+    (description "The @code{b4} command is designed to make it easier to
+participate in patch-based workflows for projects that have public-inbox
+archives.  Features include
+@itemize
+@item downloading a thread's mbox given a message ID
+@item processing an mbox so that is ready to be fed to @code{git-am}
+@item creating templated replies for processed patches and pull requests
+@item submitting cryptographic attestation for patches.
+@end itemize")
+    (license license:gpl2+)))
+
 (define-public git-annex-remote-rclone
   (package
     (name "git-annex-remote-rclone")

base-commit: 4e9b2e8ba26dd601df67f112852237d5df2f3341
-- 
2.29.2.454.gaff20da3a2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]