From cd95cb287e48fa4589fe813e150e2a31afa253b6 Mon Sep 17 00:00:00 2001 From: François J Date: Fri, 23 Apr 2021 09:17:17 +0200 Subject: gnu: Add git-filter-repo. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/version-control.scm (git-filter-repo): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/version-control.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'gnu/packages/version-control.scm') 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 ;;; Copyright © 2021 LibreMiami ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2021 François J. ;;; ;;; 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. -- cgit v1.2.3