all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#69548] [PATCH] gnu: Add git-extras.
@ 2024-03-04 16:47 Greg Hogan
  2024-03-19 16:21 ` Ludovic Courtès
  2024-03-20 17:47 ` [bug#69548] [PATCH v2] " Greg Hogan
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Hogan @ 2024-03-04 16:47 UTC (permalink / raw)
  To: 69548; +Cc: Greg Hogan

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

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

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





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

* [bug#69548] [PATCH] gnu: Add git-extras.
  2024-03-04 16:47 [bug#69548] [PATCH] gnu: Add git-extras Greg Hogan
@ 2024-03-19 16:21 ` Ludovic Courtès
  2024-03-20 17:47 ` [bug#69548] [PATCH v2] " Greg Hogan
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2024-03-19 16:21 UTC (permalink / raw)
  To: Greg Hogan; +Cc: 69548

Hi,

Greg Hogan <code@greghogan.com> skribis:

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

[...]

> +    (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’.




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

* [bug#69548] [PATCH v2] gnu: Add git-extras.
  2024-03-04 16:47 [bug#69548] [PATCH] gnu: Add git-extras Greg Hogan
  2024-03-19 16:21 ` Ludovic Courtès
@ 2024-03-20 17:47 ` Greg Hogan
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Hogan @ 2024-03-20 17:47 UTC (permalink / raw)
  To: 69548; +Cc: Greg Hogan

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

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





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

end of thread, other threads:[~2024-03-20 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 16:47 [bug#69548] [PATCH] gnu: Add git-extras Greg Hogan
2024-03-19 16:21 ` Ludovic Courtès
2024-03-20 17:47 ` [bug#69548] [PATCH v2] " Greg Hogan

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.