diff mbox series

[bug#47968] gnu: Add git-filter-repo

Message ID bbfe693bd469ea81018314f59f55ccd42fb31525.1620070335.git.francois-oss@avalenn.eu
State Accepted
Headers show
Series [bug#47968] gnu: Add git-filter-repo | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

François April 23, 2021, 7:17 a.m. UTC
I use release tarball (instead of git as I would have liked) because it
contains pre-compiled man-pages which are too hard to build in this
context as it uses git Makefile to do it.

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

Signed-off-by: François J <francois-oss@avalenn.eu>
---
 gnu/packages/version-control.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

I changed the description by taking a more complete one from upstream. I
have chosen to not capitalize the "git" in "git filter-repo" to respect
upstream capitalization but have no opinion on the matter.

Comments

Ludovic Courtès May 3, 2021, 8:46 p.m. UTC | #1
François J <francois-oss@avalenn.eu> skribis:

> I use release tarball (instead of git as I would have liked) because it
> contains pre-compiled man-pages which are too hard to build in this
> context as it uses git Makefile to do it.
>
> * gnu/packages/version-control.scm (git-filter-repo): New variable.
>
> Signed-off-by: François J <francois-oss@avalenn.eu>

Applied with minor changes: addressing remaining ‘guix lint’ complaints,
tweaking indentation, and adding ‘python’ as an input so that the
shebang of ‘git-filter-repo’ gets patched (otherwise it’d remain
“#!/usr/bin/env python3”.)

Thanks!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index fddabbcd40..4460c1c548 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -38,6 +38,7 @@ 
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 François J. <francois-oss@avalenn.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3074,3 +3075,31 @@  If several repos are related, it helps to see their status together.")
 makes a directory under a specific root directory (by default @file{~/ghq})
 using the remote repository URL's host and path.")
     (license license:expat)))
+
+(define-public git-filter-repo
+  (package
+    (name "git-filter-repo")
+    (version "2.29.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/newren/git-filter-repo/releases/"
+                           "download/v" version
+                           "/git-filter-repo-" version ".tar.xz"))
+       (sha256
+        (base32
+         "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb"))))
+    (build-system copy-build-system)
+    (arguments
+     `(#:install-plan
+       '(("git-filter-repo" "libexec/git-core/")
+         ("Documentation/man1/" "share/man/man1")
+         ("/" "" #:include ()))))
+    (home-page
+     "https://github.com/newren/git-filter-repo")
+    (synopsis
+     "Quickly rewrite Git repository history")
+    (description
+     "git filter-repo is a versatile tool for rewriting history, which roughly falls into the same space of tool like git filter-branch but with more capabilities. git filter-repo is now recommended by the Git project instead of git filter-branch.")
+    (license (list license:expat ;; Main license.
+                   license:gpl2)))) ;; For test harness.