summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorFrançois J <francois-oss@avalenn.eu>2021-04-23 09:17:17 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-03 23:10:01 +0200
commitcd95cb287e48fa4589fe813e150e2a31afa253b6 (patch)
tree382a6dca6447f85553c60b95654e7e4b45ce401b /gnu/packages
parent817f40d0ac766a36795d40d31f9999889aa7de4d (diff)
downloadguix-cd95cb287e48fa4589fe813e150e2a31afa253b6.tar.gz
gnu: Add git-filter-repo.
* gnu/packages/version-control.scm (git-filter-repo): New variable.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/version-control.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1ab97d4dad..0cad83c4b0 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.
 ;;;
@@ -3083,3 +3084,36 @@ 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
+       ;; Use a release tarball instead of 'git-fetch' because it contains
+       ;; pre-compiled man-pages which are too hard to build in this context
+       ;; as it depends on Git's Makefile.
+       (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 ()))))
+    (inputs `(("python" ,python)))                ;for the shebang
+    (home-page "https://github.com/newren/git-filter-repo")
+    (synopsis "Quickly rewrite Git repository history")
+    (description
+     "@command{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.  @command{git filter-repo} is now recommended by the
+Git project instead of @command{git filter-branch}.")
+    (license (list license:expat ;; Main license.
+                   license:gpl2)))) ;; For test harness.