aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2024-02-16 01:34:59 +0800
committerHilton Chain <hako@ultrarare.space>2024-02-25 00:07:30 +0800
commit313458c58c3fd89705081e1721e7c6fe7818d813 (patch)
tree5df790144d269e7a65cd2af1845290541c575ac3 /gnu/packages/version-control.scm
parente3e64acdb8ea8a9b55e376595b0fb1018e170376 (diff)
downloadguix-313458c58c3fd89705081e1721e7c6fe7818d813.tar
guix-313458c58c3fd89705081e1721e7c6fe7818d813.tar.gz
gnu: git-filter-repo: Update to 2.38.0.
* gnu/packages/patches/git-filter-repo-generate-doc.patch: New file. * gnu/local.mk (dist_patch_DATA): Regisiter it. * gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0. [source]: Switch to git-fetch. Use the patch. [build-system]: Switch to gnu-build-system. [native-inputs]: Add asciidoc, docbook-xsl, libxml2, xmlto. Modified-by: Hilton Chain <hako@ultrarare.space> Change-Id: I7b15975ea56c44ae580d19cfe5a9e3eb75c6db0d Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm69
1 files changed, 55 insertions, 14 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index cef0012645..af237ab4ee 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -50,6 +50,8 @@
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023 Kjartan Oli Agustsson <kjartanoli@disroot.org>
;;; Copyright © 2023 Steve George <steve@futurile.net>
+;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
+;;; Copyright © 2024 Hilton Chain <hako@ultrarare.space>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3846,25 +3848,64 @@ TkDiff is included for browsing and merging your changes.")
(define-public git-filter-repo
(package
(name "git-filter-repo")
- (version "2.29.0")
+ (version "2.38.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"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/newren/git-filter-repo")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb"))))
- (build-system copy-build-system)
+ "1al43zpw1mdfy9i05w4xw178abypjwnkk52lqvmbl19lr1l47r4i"))
+ ;; Modified from <https://github.com/newren/git-filter-repo/pull/477>.
+ ;; Used with 'unpack-git-source phase.
+ (patches (search-patches "git-filter-repo-generate-doc.patch"))))
+ (build-system gnu-build-system)
(arguments
- `(#:install-plan
- '(("git-filter-repo" "libexec/git-core/")
- ("Documentation/man1/" "share/man/man1")
- ("/" "" #:include ()))))
+ (list
+ #:tests? #f ;No tests.
+ #:imported-modules
+ `(,@%gnu-build-system-modules
+ (guix build python-build-system))
+ #:modules
+ '((guix build gnu-build-system)
+ ((guix build python-build-system) #:select (site-packages))
+ (guix build utils)
+ (srfi srfi-26))
+ #:make-flags
+ #~(list (string-append "prefix=" #$output)
+ (string-append "VERSION=" #$(package-version this-package)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'unpack-git-source
+ (lambda _
+ (let* ((old-path (getcwd))
+ (doc-source (string-append old-path "/Documentation")))
+ (mkdir-p "git-source")
+ (chdir "git-source")
+ ((assoc-ref %standard-phases 'unpack)
+ #:source #+(package-source git))
+ (for-each
+ (cut install-file <> doc-source)
+ (find-files "." "asciidoc\\.conf$|manpage.*\\.xsl$"))
+ (chdir old-path)
+ (delete-file-recursively "git-source"))))
+ (add-before 'build 'set-pythondir
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("(pythondir = ).*" _ pre)
+ (string-append pre (site-packages inputs outputs))))))
+ (replace 'build
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "doc" make-flags))))))
+ (native-inputs
+ (list asciidoc
+ docbook-xsl
+ libxml2 ;for XML_CATALOG_FILES
+ xmlto))
(inputs (list python)) ;for the shebang
(home-page "https://github.com/newren/git-filter-repo")
(synopsis "Quickly rewrite Git repository history")