[PATCH] gnu: Add git-extras.

  • Done
  • quality assurance status badge
Details
4 participants
  • Greg Hogan
  • Ludovic Courtès
  • Sharlatan Hellseher
  • Steve George
Owner
unassigned
Submitted by
Greg Hogan
Severity
normal
G
G
Greg Hogan wrote on 4 Mar 17:47 +0100
(address . guix-patches@gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
025880776c6df96b0e34ee83575eb0905d2323b8.1709570697.git.code@greghogan.com
* gnu/packages/version-control.scm (git-extras): New variable.

Change-Id: I81a4d89c72f5a506bfa9ae4a6ccfa45f7e0102f7
---
gnu/packages/version-control.scm | 44 ++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (80 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 58a21a6fe0..387206d7e7 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -104,6 +104,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -120,6 +121,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages less)
#:use-module (gnu packages linux)
#:use-module (gnu packages mail)
#:use-module (gnu packages man)
@@ -140,6 +142,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
@@ -3971,6 +3974,47 @@ (define-public gitlint
commit messages for style.")
(license license:expat)))
+(define-public git-extras
+ (package
+ (name "git-extras")
+ (version "7.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tj/git-extras")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zvmc8rrrmfn0wv603l0ql7h00mdknqvh6dnb86xhi6kfl018mbv"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; No configure script.
+ (delete 'configure))))
+ (propagated-inputs
+ (list coreutils
+ curl
+ findutils
+ gawk
+ git
+ less
+ ncurses
+ procps
+ rsync
+ sed
+ util-linux))
+ (home-page "https://github.com/tj/git-extras")
+ (synopsis "Additional Git utilities")
+ (description "The git-extras package provides a collection of additional
+git commands for repository metrics and summarization, commit and log editing,
+developer workflow, and project and release management.")
+ (license license:expat)))
+
(define-public hut
(package
(name "hut")

base-commit: 1fd308d5f6e4b03236cfa0c4cfadbbe9fe66e24c
--
2.44.0
L
L
Ludovic Courtès wrote on 19 Mar 17:21 +0100
(name . Greg Hogan)(address . code@greghogan.com)(address . 69548@debbugs.gnu.org)
87edc62nwf.fsf@gnu.org
Hi,

Greg Hogan <code@greghogan.com> skribis:

Toggle quote (4 lines)
> * gnu/packages/version-control.scm (git-extras): New variable.
>
> Change-Id: I81a4d89c72f5a506bfa9ae4a6ccfa45f7e0102f7

[...]

Toggle quote (13 lines)
> + (propagated-inputs
> + (list coreutils
> + curl
> + findutils
> + gawk
> + git
> + less
> + ncurses
> + procps
> + rsync
> + sed
> + util-linux))

Instead of propagating all these, which is quite intrusive, would it be
possible to change the relevant scripts to start with:

export PATH=…

?

I’d also recommend depending on ‘coreutils-minimal’ rather than
‘coreutils’.

Thanks,
Ludo’.
G
G
Greg Hogan wrote on 20 Mar 18:47 +0100
[PATCH v2] gnu: Add git-extras.
(address . 69548@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
e92bb8b04e551e9c80ed8c6a1d6d440df4d7bee4.1710956589.git.code@greghogan.com
Second version moves all propagated inputs except git to inputs and
instead injects the requisite bin directories into PATH at the beginning
of each script.

Also removes the unused bootstrap, build, and check phases.

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

Change-Id: I7493ec9284559596d35546211b5f642f851dc485
---
gnu/packages/version-control.scm | 72 ++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)

Toggle diff (108 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 946b1f5aac..763d46b1f9 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -104,6 +104,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -120,6 +121,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages less)
#:use-module (gnu packages linux)
#:use-module (gnu packages mail)
#:use-module (gnu packages man)
@@ -140,6 +142,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
@@ -3971,6 +3974,75 @@ (define-public gitlint
commit messages for style.")
(license license:expat)))
+(define-public git-extras
+ (package
+ (name "git-extras")
+ (version "7.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tj/git-extras")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zvmc8rrrmfn0wv603l0ql7h00mdknqvh6dnb86xhi6kfl018mbv"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; No configure script, build process, or tests.
+ (delete 'bootstrap)
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (add-after 'unpack 'hardcode-dependency-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; The Makefile injects helper scripts and functions into each
+ ;; script. This substitution injects a PATH appending the bin
+ ;; directory of each non-propagated input in order to minimize
+ ;; the number of packages propagated to the profile.
+ (substitute* "Makefile"
+ (("head -1 bin/\\$\\(COMMAND\\) > \\$\\(TEMPFILE\\); \\\\" line)
+ (string-append
+ line "\n"
+ "echo 'PATH=$$PATH:"
+ (string-join
+ (map (lambda (name) (assoc-ref inputs name))
+ (list "coreutils-minimal"
+ "curl"
+ "findutils"
+ "gawk"
+ "less"
+ "ncurses"
+ "procps"
+ "rsync"
+ "sed"
+ "util-linux"))
+ "/bin:")
+ "' >> $(TEMPFILE); \\"))))))))
+ (propagated-inputs (list git))
+ (inputs
+ (list coreutils-minimal
+ curl
+ findutils
+ gawk
+ less
+ ncurses
+ procps
+ rsync
+ sed
+ util-linux))
+ (home-page "https://github.com/tj/git-extras")
+ (synopsis "Additional Git utilities")
+ (description "The git-extras package provides a collection of additional
+git commands for repository metrics and summarization, commit and log editing,
+developer workflow, and project and release management.")
+ (license license:expat)))
+
(define-public hut
(package
(name "hut")

base-commit: 61655b2479b43e6294e753280e888919b3a38c80
--
2.44.0
G
G
Greg Hogan wrote on 22 Oct 19:21 +0200
[PATCH v3] gnu: Add git-extras.
(address . 69548@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
5ccd1556dfe5952019751813e89e25e1b192877f.1729617189.git.code@greghogan.com
This revision updates the package version, necessitating use of a temporary file
to store the PATH modifications to prevent "Argument length too long" errors.

* gnu/packages/version-control.scm (git-extras): New variable.
---
gnu/packages/version-control.scm | 75 ++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)

Toggle diff (111 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6bd37fee82..b381ea7ef7 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -111,6 +111,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -127,6 +128,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages less)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
@@ -149,6 +151,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
@@ -4251,6 +4254,78 @@ (define-public gitlint
commit messages for style.")
(license license:expat)))
+(define-public git-extras
+ (package
+ (name "git-extras")
+ (version "7.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tj/git-extras")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1lig1sbk83qqvbvpmpcjaf23nk0r7snny5lix75ym1z320970xni"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; No configure script, build process, or tests.
+ (delete 'bootstrap)
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (add-after 'unpack 'hardcode-dependency-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Write to and copy from temporary file to prevent
+ ;; "make: bash: Argument list too long" errors.
+ (let* ((temp-file (mkstemp! "temp-file.XXXXXX"))
+ (temp-filename (port-filename temp-file)))
+ (map (lambda (name)
+ (format temp-file "export PATH=$PATH:~a/bin~%"
+ (assoc-ref inputs name)))
+ (list "coreutils-minimal"
+ "curl"
+ "findutils"
+ "gawk"
+ "less"
+ "ncurses"
+ "procps"
+ "rsync"
+ "sed"
+ "util-linux"))
+ ;; The Makefile injects helper scripts and functions into each
+ ;; script. This substitution injects a PATH appending the bin
+ ;; directory of each non-propagated input in order to minimize
+ ;; the number of packages propagated to the profile.
+ (substitute* "Makefile"
+ (("head -1 bin/\\$\\(COMMAND\\) > \\$\\(TEMPFILE\\); \\\\" line)
+ (string-append
+ line "\n"
+ "cat " temp-filename " >> $(TEMPFILE); \\")))))))))
+ (propagated-inputs (list git))
+ (inputs
+ (list coreutils-minimal
+ curl
+ findutils
+ gawk
+ less
+ ncurses
+ procps
+ rsync
+ sed
+ util-linux))
+ (home-page "https://github.com/tj/git-extras")
+ (synopsis "Additional Git utilities")
+ (description "The git-extras package provides a collection of additional
+git commands for repository metrics and summarization, commit and log editing,
+developer workflow, and project and release management.")
+ (license license:expat)))
+
(define-public hut
(package
(name "hut")

base-commit: 3bcd0bf9e6c474afb07275f39d121b714d19c9ab
--
2.46.1
S
S
Sharlatan Hellseher wrote on 4 Nov 00:40 +0100
[PATCH] gnu: Add git-extras.
(address . 69548-done@debbugs.gnu.org)
87jzdjubr4.fsf@gmail.com
Hi,

Pushed as ccf4a0fa2d to master.

--
Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmcoCf8ACgkQdtcnv/Ys
0rUO5g/+NtIyka5Yj9+j2b0RiZxjWEjZyzWr2lxmZydKzny8AwsN+04FPVz4/eQ2
a0D7jqHahg7ZtRbmeXBUhI7iw4AMNr9ByOHJBJiFTAcX2sxKsOK96q/E+JxZq2sP
4kDuuVLY6gdXBBbDO4NO627eN+M/7tzKekrrfzxDDYsZkYBkAy1TqGDU3HcYva5f
9+1luqiwqoo7oMlMy9aihszBQ4Rs0U0roQgTqHQ5Q77NWANTGrJwUn8HO9pOvtqR
HNuuxhnv6/eNKPxdPGa1XZwfh3+Bb9brMGm8L5uFF3VWdXqhkuSt4O7+/bm9bp63
qH2B/LuoEAmx3tSlOhSa0uGf2OwXgj+ZCoBn7uCquaH9laVCqd5WCjPH0DxSakNU
LtEm36zsik1baafw88zBdxEcR91iy+kDXTOpzLAHlnsZFSQSgjx/P1luBXJqWA17
pUkmmxSkRMNYyZVbTBDa9tsWq+HlnC2D9sfAAOBR8b7EenIhPN3nw9QsPXeTgywL
WP1gaJzJ42CIpi6ost1Oq81t0GXiClMX3H0wZoyFZIvhbH1FyanXEy+6W14dqBvI
sec8n+7hOupW8hMoNynkECqDZtIPLbP5+2/okq5012KXNB6MOlEvN6P7aVahr8g9
/Q6bxC0CAh/ZuLHoSkGqFklikf+ffUt9FjKb8EH2ENs9m9ZgLNs=
=k5LF
-----END PGP SIGNATURE-----

Closed
S
S
Steve George wrote on 4 Nov 14:10 +0100
closing 69548
(address . control@debbugs.gnu.org)(address . 69548-submitter@debbugs.gnu.org)
1730725762-2908-bts-steve@futurile.net
close 69548
# hi Greg - went into the archive as ccf4a0fa2d9baae29541dbf149b3b8c0144ee0da
# looks super useful, especially git rebase-patch !
thanks
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69548@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69548
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch