all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#52296] [PATCH 1/4] gnu: Add git-absorb
@ 2021-12-05  6:57 jgart via Guix-patches via
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
  2021-12-06  3:16 ` [bug#52296] [PATCH v2] gnu: Add git-absorb jgart via Guix-patches via
  0 siblings, 2 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05  6:57 UTC (permalink / raw)
  To: 52296

Hi Guixers,

Here is git-absorb.

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 fixup! commits for each of those changes.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
  2021-12-05  6:57 [bug#52296] [PATCH 1/4] gnu: Add git-absorb jgart via Guix-patches via
@ 2021-12-05  7:01 ` jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 2/4] gnu: Add rust-slog-async-2.5 jgart via Guix-patches via
                     ` (3 more replies)
  2021-12-06  3:16 ` [bug#52296] [PATCH v2] gnu: Add git-absorb jgart via Guix-patches via
  1 sibling, 4 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05  7:01 UTC (permalink / raw)
  To: 52296; +Cc: jgart

* gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.
---
 gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7d5833ffc0..8bc49fcce6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2021 Jacob Hrbek <kreyren@rixotstudio.cz>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29019,6 +29020,26 @@ (define-public rust-measureme-0.7
 unstable -Z self-profile flag.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-memchr-2.3
+  (package
+    (name "rust-memchr")
+    (version "2.3.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "memchr" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "098m9clfs495illlw00hv2gg67mhm7jflld3msyclvi5m9xc9q8f"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t #:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
+    (home-page "https://github.com/BurntSushi/memchr")
+    (synopsis "Safe interface to memchr.")
+    (description "Safe interface to memchr.")
+    (license 
+      (list license:unlicense license:expat))))
+
 (define-public rust-memchr-2
   (package
     (name "rust-memchr")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 2/4] gnu: Add rust-slog-async-2.5.
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
@ 2021-12-05  7:01   ` jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 3/4] gnu: Add rust-tempfile-3.1 jgart via Guix-patches via
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05  7:01 UTC (permalink / raw)
  To: 52296; +Cc: jgart

* gnu/packages/crates-io.scm (rust-slog-async-2.5): New variable.
---
 gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8bc49fcce6..73244fdd6e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49134,6 +49134,31 @@ (define-public rust-slog-2
             license:expat
             license:asl2.0))))
 
+(define-public rust-slog-async-2.5
+  (package
+    (name "rust-slog-async")
+    (version "2.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "slog-async" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1fzvx0n2q02bjrcjjylsgdr74d2yp1zc17s9fdkgkqkwwin37csi"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-take-mut" ,rust-take-mut-0.2)
+         ("rust-thread-local" ,rust-thread-local-1))))
+    (home-page "https://github.com/slog-rs/slog")
+    (synopsis "Asynchronous drain for slog-rs")
+    (description "Asynchronous drain for slog-rs")
+    (license (list license:mpl2.0 license:expat license:asl2.0))))
+
 (define-public rust-slog-async-2
   (package
     (name "rust-slog-async")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 3/4] gnu: Add rust-tempfile-3.1.
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 2/4] gnu: Add rust-slog-async-2.5 jgart via Guix-patches via
@ 2021-12-05  7:01   ` jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 4/4] gnu: Add git-absorb jgart via Guix-patches via
  2021-12-05 13:05   ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 Nicolas Goaziou
  3 siblings, 0 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05  7:01 UTC (permalink / raw)
  To: 52296; +Cc: jgart

* gnu/packages/crates-io.scm (rust-tempfile-3.1): New variable.
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 73244fdd6e..ad90a2d4a4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -53408,6 +53408,34 @@ (define-public rust-tempdir-0.3
     (license (list license:asl2.0
                    license:expat))))
 
+(define-public rust-tempfile-3.1
+  (package
+    (name "rust-tempfile")
+    (version "3.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "tempfile" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1a9cfdqw70n7bcnkx05aih9xdba8lqazmqlkjpkmn2la6gcj8vks"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-cfg-if" ,rust-cfg-if-0.1)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-rand" ,rust-rand-0.7)
+         ("rust-redox-syscall" ,rust-redox-syscall-0.1)
+         ("rust-remove-dir-all" ,rust-remove-dir-all-0.5)
+         ("rust-winapi" ,rust-winapi-0.3))))
+    (home-page "http://stebalien.com/projects/tempfile-rs")
+    (synopsis "A library for managing temporary files and directories.")
+    (description
+      "This package provides a library for managing temporary files and directories.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-tempfile-3
   (package
     (name "rust-tempfile")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 4/4] gnu: Add git-absorb.
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 2/4] gnu: Add rust-slog-async-2.5 jgart via Guix-patches via
  2021-12-05  7:01   ` [bug#52296] [PATCH 3/4] gnu: Add rust-tempfile-3.1 jgart via Guix-patches via
@ 2021-12-05  7:01   ` jgart via Guix-patches via
  2021-12-05 13:05   ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 Nicolas Goaziou
  3 siblings, 0 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05  7:01 UTC (permalink / raw)
  To: 52296; +Cc: jgart

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

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index be60f3f376..6ce98610f5 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,52 @@ (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.3)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-slog-async" ,rust-slog-async-2.5)
+         ("rust-slog-term" ,rust-slog-term-2))
+        #:cargo-development-inputs
+        (("rust-tempfile" ,rust-tempfile-3.1))
+        #:phases
+        (modify-phases %standard-phases
+         (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")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
                     ` (2 preceding siblings ...)
  2021-12-05  7:01   ` [bug#52296] [PATCH 4/4] gnu: Add git-absorb jgart via Guix-patches via
@ 2021-12-05 13:05   ` Nicolas Goaziou
  2021-12-05 15:06     ` jgart via Guix-patches via
  3 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2021-12-05 13:05 UTC (permalink / raw)
  To: 52296; +Cc: jgart

Hello,

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

> * gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.

We usually don't add a new Rust package for minor version bumps after
1.0. The way to go would be to relax version requirements in
Cargo.toml so we can use rust-memchr-2. See for example
rust-average-0.13 package.

The same goes for rust-slog-async-2.5 and rust-tempfile-3.1.

Could you give it a try?


Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
  2021-12-05 13:05   ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 Nicolas Goaziou
@ 2021-12-05 15:06     ` jgart via Guix-patches via
  2021-12-05 18:13       ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-05 15:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 52296

On Sun, 05 Dec 2021 14:05:36 +0100 Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
> 
> jgart via Guix-patches via <guix-patches@gnu.org> writes:
> 
> > * gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.
> 
> We usually don't add a new Rust package for minor version bumps after
> 1.0. The way to go would be to relax version requirements in
> Cargo.toml so we can use rust-memchr-2. See for example
> rust-average-0.13 package.
> 
> The same goes for rust-slog-async-2.5 and rust-tempfile-3.1.

Hi Nicolas,

Thank you for taking the time to review this patch set.

rust-slog and rust-slog-async have the exact same version in the toml file:

```
[dependencies.slog]
version = "~2.5"

[dependencies.slog-async]
version = "~2.5"
```

The versions currently packaged in guix are slog 2.5.2 and slog-async 2.6.0.

I'm stumped on how to differentiate those two using `substitute*`

What do you suggest I do here?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
  2021-12-05 15:06     ` jgart via Guix-patches via
@ 2021-12-05 18:13       ` Nicolas Goaziou
  0 siblings, 0 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2021-12-05 18:13 UTC (permalink / raw)
  To: jgart; +Cc: 52296

Hello,

jgart <jgart@dismail.de> writes:

> rust-slog and rust-slog-async have the exact same version in the toml file:
>
> ```
> [dependencies.slog]
> version = "~2.5"
>
> [dependencies.slog-async]
> version = "~2.5"
> ```
>
> The versions currently packaged in guix are slog 2.5.2 and slog-async 2.6.0.
>
> I'm stumped on how to differentiate those two using `substitute*`
>
> What do you suggest I do here?

In a subtle fashion, I would change both to "^2" and cross fingers.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH v2] gnu: Add git-absorb.
  2021-12-05  6:57 [bug#52296] [PATCH 1/4] gnu: Add git-absorb jgart via Guix-patches via
  2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
@ 2021-12-06  3:16 ` jgart via Guix-patches via
  2021-12-06  9:49   ` Nicolas Goaziou
  1 sibling, 1 reply; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-06  3:16 UTC (permalink / raw)
  To: 52296; +Cc: jgart

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(+)

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")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH v2] gnu: Add git-absorb.
  2021-12-06  3:16 ` [bug#52296] [PATCH v2] gnu: Add git-absorb jgart via Guix-patches via
@ 2021-12-06  9:49   ` Nicolas Goaziou
  2021-12-06  9:56     ` jgart via Guix-patches via
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2021-12-06  9:49 UTC (permalink / raw)
  To: 52296; +Cc: jgart, 52296-done

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#52296] [PATCH v2] gnu: Add git-absorb.
  2021-12-06  9:49   ` Nicolas Goaziou
@ 2021-12-06  9:56     ` jgart via Guix-patches via
  0 siblings, 0 replies; 11+ messages in thread
From: jgart via Guix-patches via @ 2021-12-06  9:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 52296-done, 52296

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-06  9:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05  6:57 [bug#52296] [PATCH 1/4] gnu: Add git-absorb jgart via Guix-patches via
2021-12-05  7:01 ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 jgart via Guix-patches via
2021-12-05  7:01   ` [bug#52296] [PATCH 2/4] gnu: Add rust-slog-async-2.5 jgart via Guix-patches via
2021-12-05  7:01   ` [bug#52296] [PATCH 3/4] gnu: Add rust-tempfile-3.1 jgart via Guix-patches via
2021-12-05  7:01   ` [bug#52296] [PATCH 4/4] gnu: Add git-absorb jgart via Guix-patches via
2021-12-05 13:05   ` [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3 Nicolas Goaziou
2021-12-05 15:06     ` jgart via Guix-patches via
2021-12-05 18:13       ` Nicolas Goaziou
2021-12-06  3:16 ` [bug#52296] [PATCH v2] gnu: Add git-absorb jgart via Guix-patches via
2021-12-06  9:49   ` Nicolas Goaziou
2021-12-06  9:56     ` jgart via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.