[PATCH] gnu: Add git-when-merged.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kyle Meyer
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kyle Meyer
Severity
normal

Debbugs page

Kyle Meyer wrote 6 years ago
(address . guix-patches@gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20181112212423.23811-1-kyle@kyleam.com
* gnu/packages/version-control.scm (git-when-merged): New variable.
---
gnu/packages/version-control.scm | 52 ++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 04d28044dd..fd90513000 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2279,3 +2279,55 @@ used to keep a folder in sync between computers.")
;; The web app is released under the AGPLv3+.
(license (list license:gpl3+
license:agpl3+))))
+
+(define-public git-when-merged
+ ;; Use an unreleased version to get a PY3 compatibility fix.
+ (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
+ (package
+ (name "git-when-merged")
+ (version (string-append "1.2.0-" (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mhagger/git-when-merged/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; there are no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "bin/git-when-merged"
+ (string-append (assoc-ref outputs "out")
+ "/bin"))
+ #t))
+ (add-before 'install 'patch-git
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((git (string-append (assoc-ref inputs "git")
+ "/bin/git")))
+ (substitute* "bin/git-when-merged"
+ (("'git'") (string-append "'" git "'")))
+ #t)))
+ (add-after 'install 'wrap-script
+ (lambda* (#:key outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/git-when-merged")
+ `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ #t)))))
+ (inputs
+ `(("git" ,git)
+ ("python" ,python-wrapper)))
+ (home-page "https://github.com/mhagger/git-when-merged")
+ (synopsis "Determine when a commit was merged into a Git branch")
+ (description "This Git extension defines a subcommand,
+@code{when-merged}, whose core operation is to find the merge that brought a
+given commit into the specified ref(s). It has various options that control
+how information about the merge is displayed.")
+ (license license:gpl2))))
--
2.19.1
Ludovic Courtès wrote 6 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 33358-done@debbugs.gnu.org)
875zwwr7rq.fsf@gnu.org
Hi,

Kyle Meyer <kyle@kyleam.com> skribis:

Toggle quote (2 lines)
> * gnu/packages/version-control.scm (git-when-merged): New variable.

Applied, thanks!

Ludo'.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 33358
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help