Subject: [bug#73073] [PATCH v2 7/8] gnu: git: Move git-manpages origin from phases to native-inputs.

From: Simon Tournier <[email-masked]>
Date: Tue, 10 Sep 2024 03:27:15 +0200

* gnu/packages/version-control.scm (git)[arguments]<phases>: Move git-manpages
origin from here...
[native-inputs]: ...to here.

Change-Id: I4affbb032523e634b82c7e33343d0dc0797cb393
---
 gnu/packages/version-control.scm | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 0c4cdedce8..a0fdcb0da9 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -693,15 +693,9 @@ (define-public git
                   (with-directory-excursion man
                     (invoke
                      "tar" "xvf"
-                     #$(origin
-                         (method url-fetch)
-                         (uri (string-append
-                               "mirror://kernel.org/software/scm/git/"
-                               "git-manpages-" (package-version this-package)
-                               ".tar.xz"))
-                         (sha256
-                          (base32
-                           "1lvvhzypllbyd8j6m0p9qgd3gqg10gch9s7lqif8vr9n80fqn4fw"))))))))))))
+                     #$(this-package-native-input
+                        (string-append
+                         "git-manpages-" (package-version this-package) ".tar.xz")))))))))))
     (native-inputs
      (modify-inputs (package-native-inputs git-minimal)
        ;; For subtree documentation.
@@ -712,7 +706,18 @@ (define-public git
                libxslt
                pkg-config
                texinfo
-               xmlto)))
+               xmlto
+               ;; To build the man pages from the git sources, we would need a dependency
+               ;; on a full XML tool chain, and building it actually takes ages.  So we
+               ;; use this lazy approach and use released tarball.
+               (origin
+                 (method url-fetch)
+                 (uri (string-append
+                       "mirror://kernel.org/software/scm/git/git-manpages-"
+                       (package-version this-package) ".tar.xz"))
+                 (sha256
+                  (base32
+                   "1pqrp46kwbxycqld39027ph1cvkq9am156y3sswn6w2khsg30f09"))))))
     (inputs
      (modify-inputs (package-inputs git-minimal)
        (append bash-minimal             ;for wrap-program
-- 
2.45.2