summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorHilton Chain <[email protected]>2025-01-30 16:41:30 +0800
committerHilton Chain <[email protected]>2025-01-30 20:18:05 +0800
commitb85d20e853192a92093cd8d6a5756ec80e94c658 (patch)
treeaaf4fdb8c99a945b2e4f1e48236e5dfd489f109b /gnu
parenta400f3d754c5f2e8aa44420317e1acea898b0844 (diff)
gnu: git-filter-repo: Enable tests.
* gnu/packages/version-control.scm (git-filter-repo)[arguments]: Enable tests. [native-inputs]: Add git-minimal, perl, rsync. Change-Id: I74f395faaada911f5d2e5375b2fce769ab22cf92
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/version-control.scm23
1 files changed, 19 insertions, 4 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 39d5c33b20..f02f62766d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4403,13 +4403,18 @@ TkDiff is included for browsing and merging your changes.")
(sha256
(base32
"03sjxscj7pkldvwcvlqi6k79rcxkd2fyy1rjvpwyp4jgni5kddkx"))
+ ;; TODO: Remove when updating to 2.47.0.
+ (modules '((guix build utils)))
+ (snippet
+ #~(substitute* "t/t9390-filter-repo.sh"
+ (("(test_expect_success) ('--version')" _ prefix suffix)
+ (string-append prefix " IN_FILTER_REPO_CLONE " suffix))))
;; 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
(list
- #:tests? #f ;No tests.
#:imported-modules
`(,@%default-gnu-imported-modules
(guix build python-build-system))
@@ -4431,7 +4436,8 @@ TkDiff is included for browsing and merging your changes.")
(mkdir-p "git-source")
(chdir "git-source")
((assoc-ref %standard-phases 'unpack)
- #:source #+(package-source git))
+ #:source
+ #+(package-source (this-package-native-input "git-minimal")))
(for-each
(cut install-file <> doc-source)
(find-files "." "asciidoc\\.conf\\.in$|manpage.*\\.xsl$"))
@@ -4449,12 +4455,21 @@ TkDiff is included for browsing and merging your changes.")
(string-append pre (site-packages inputs outputs))))))
(replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "doc" make-flags))))))
+ (apply invoke "make" "doc" make-flags)))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (substitute* "t/t9391-filter-repo-lib-usage.sh"
+ (("/bin/bash") (which "bash")))
+ (when tests?
+ (invoke "t/run_tests")))))))
(native-inputs
(list asciidoc
docbook-xsl
+ git-minimal
libxml2 ;for XML_CATALOG_FILES
- xmlto))
+ xmlto
+ perl
+ rsync))
(inputs (list python)) ;for the shebang
(home-page "https://github.com/newren/git-filter-repo")
(synopsis "Quickly rewrite Git repository history")