diff mbox series

[bug#52296,v2] gnu: Add git-absorb.

Message ID 20211206031626.8061-1-jgart@dismail.de
State Accepted
Headers show
Series [bug#52296,v2] gnu: Add git-absorb. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

jgart Dec. 6, 2021, 3:16 a.m. UTC
Hi Nicolas,

Here's the updated and smaller patchset. It worked! :)

all best,

jgart

* gnu/packages/rust-apps.scm (git-absorb): New variable.
---
 gnu/packages/rust-apps.scm | 53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Comments

Nicolas Goaziou Dec. 6, 2021, 9:49 a.m. UTC | #1
Hello,

jgart via Guix-patches via <guix-patches@gnu.org> writes:

> Here's the updated and smaller patchset. It worked! :)

Great! I fixed indentation and appliet it. Thank you.

Regards,
jgart Dec. 6, 2021, 9:56 a.m. UTC | #2
On Mon, 06 Dec 2021 10:49:59 +0100 Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
> 
> jgart via Guix-patches via <guix-patches@gnu.org> writes:
> 
> > Here's the updated and smaller patchset. It worked! :)
> 
> Great! I fixed indentation and appliet it. Thank you.
> 
> Regards,
> -- 
> Nicolas Goaziou

Thank you! Much appreciated
diff mbox series

Patch

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index be60f3f376..02f9592adc 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -13,6 +13,7 @@ 
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1204,6 +1205,58 @@  (define-public tealdeer
 Full featured offline client with caching support.")
     (license (list license:expat license:asl2.0))))
 
+(define-public git-absorb
+  (package
+    (name "git-absorb")
+    (version "0.6.6")
+    (source
+     (origin
+       ;; crates.io does not include the manual page.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tummychow/git-absorb")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "04v10bn24acify34vh5ayymsr1flcyb05f3az9k1s2m6nlxy5gb9"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-anyhow" ,rust-anyhow-1)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-git2" ,rust-git2-0.13)
+         ("rust-memchr" ,rust-memchr-2)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-slog-async" ,rust-slog-async-2)
+         ("rust-slog-term" ,rust-slog-term-2))
+        #:cargo-development-inputs
+        (("rust-tempfile" ,rust-tempfile-3))
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'fix-version-requirements
+            (lambda _
+              (substitute* "Cargo.toml"
+                (("2.5") "2")
+                (("~2.3\"") "2\"")
+                (("3.1") "3"))))
+          (add-after 'install 'install-manual-page
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out   (assoc-ref outputs "out"))
+                     (man   (string-append out "/share/man/man1")))
+                (install-file "Documentation/git-absorb.1" man)))))))
+    (inputs
+     `(("zlib" ,zlib)))
+    (home-page "https://github.com/tummychow/git-absorb")
+    (synopsis "Git tool for making automatic fixup commits")
+    (description
+"@code{git absorb} allows the user to automatically absorb staged changes
+into their current branch.  @code{git absorb} will automatically identify
+which commits are safe to modify, and which staged changes belong to each
+of those commits.  It will then write @code{fixup!} commits for each of
+those changes.")
+    (license license:bsd-3)))
+
 (define-public zoxide
   (package
     (name "zoxide")