mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: git: Provide man-pages in main Git package.
* gnu/packages/version-control.scm (git-manpages): Remove variable. (git)[native-inputs]: Add git-manpages. [arguments]: Add 'install-man-pages' phase.
This commit is contained in:
parent
8ac32b57d3
commit
d1cada0450
1 changed files with 20 additions and 49 deletions
|
@ -9,6 +9,7 @@
|
||||||
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
|
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
|
||||||
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -110,7 +111,6 @@ (define-public bazaar
|
||||||
(license gpl2+)))
|
(license gpl2+)))
|
||||||
|
|
||||||
(define-public git
|
(define-public git
|
||||||
;; Keep in sync with 'git-manpages'!
|
|
||||||
(package
|
(package
|
||||||
(name "git")
|
(name "git")
|
||||||
(version "2.9.3")
|
(version "2.9.3")
|
||||||
|
@ -124,7 +124,16 @@ (define-public git
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("native-perl" ,perl)
|
`(("native-perl" ,perl)
|
||||||
("gettext" ,gnu-gettext)))
|
("gettext" ,gnu-gettext)
|
||||||
|
("git-manpages"
|
||||||
|
,(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"mirror://kernel.org/software/scm/git/git-manpages-"
|
||||||
|
version ".tar.xz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0kabsmjfbvq4y1vlwq0yl2y4033a90rnwsq01d7np3cvy55fiq0l"))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("curl" ,curl)
|
`(("curl" ,curl)
|
||||||
("expat" ,expat)
|
("expat" ,expat)
|
||||||
|
@ -260,7 +269,15 @@ (define-public git
|
||||||
;; specify a single directory, not a search path.
|
;; specify a single directory, not a search path.
|
||||||
(wrap-program (string-append out "/bin/git")
|
(wrap-program (string-append out "/bin/git")
|
||||||
`("PATH" ":" prefix
|
`("PATH" ":" prefix
|
||||||
("$HOME/.guix-profile/libexec/git-core")))))))))
|
("$HOME/.guix-profile/libexec/git-core"))))))
|
||||||
|
(add-after 'split 'install-man-pages
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(man (string-append out "/share/man"))
|
||||||
|
(manpages (assoc-ref inputs "git-manpages")))
|
||||||
|
(mkdir-p man)
|
||||||
|
(with-directory-excursion man
|
||||||
|
(zero? (system* "tar" "xvf" manpages)))))))))
|
||||||
|
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
;; For HTTPS access, Git needs a single-file certificate bundle, specified
|
;; For HTTPS access, Git needs a single-file certificate bundle, specified
|
||||||
|
@ -278,52 +295,6 @@ (define-public git
|
||||||
(license gpl2)
|
(license gpl2)
|
||||||
(home-page "http://git-scm.com/")))
|
(home-page "http://git-scm.com/")))
|
||||||
|
|
||||||
(define-public git-manpages
|
|
||||||
;; Keep in sync with 'git'!
|
|
||||||
|
|
||||||
;; Granted, we could build the man pages from the 'git' package itself,
|
|
||||||
;; which contains the real source. However, it would add a dependency on a
|
|
||||||
;; full XML tool chain, and building it actually takes ages. So we use this
|
|
||||||
;; lazy approach.
|
|
||||||
(package
|
|
||||||
(name "git-manpages")
|
|
||||||
(version (package-version git))
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append
|
|
||||||
"mirror://kernel.org/software/scm/git/git-manpages-"
|
|
||||||
version ".tar.xz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0kabsmjfbvq4y1vlwq0yl2y4033a90rnwsq01d7np3cvy55fiq0l"))))
|
|
||||||
(build-system trivial-build-system)
|
|
||||||
(arguments
|
|
||||||
'(#:modules ((guix build utils))
|
|
||||||
#:builder
|
|
||||||
(begin
|
|
||||||
(use-modules (guix build utils))
|
|
||||||
|
|
||||||
(let* ((xz (assoc-ref %build-inputs "xz"))
|
|
||||||
(tar (assoc-ref %build-inputs "tar"))
|
|
||||||
(out (assoc-ref %outputs "out"))
|
|
||||||
(man (string-append out "/share/man")))
|
|
||||||
(setenv "PATH" (string-append tar "/bin:" xz "/bin"))
|
|
||||||
|
|
||||||
(mkdir-p man)
|
|
||||||
(with-directory-excursion man
|
|
||||||
(zero? (system* "tar" "xvf"
|
|
||||||
(assoc-ref %build-inputs "source"))))))))
|
|
||||||
|
|
||||||
(native-inputs `(("tar" ,tar)
|
|
||||||
("xz" ,xz)))
|
|
||||||
(home-page (package-home-page git))
|
|
||||||
(license (package-license git))
|
|
||||||
(synopsis "Man pages of the Git version control system")
|
|
||||||
(description
|
|
||||||
"This package provides the man pages of the Git version control system.
|
|
||||||
This is the documentation displayed when using the '--help' option of a 'git'
|
|
||||||
command.")))
|
|
||||||
|
|
||||||
(define-public libgit2
|
(define-public libgit2
|
||||||
(package
|
(package
|
||||||
(name "libgit2")
|
(name "libgit2")
|
||||||
|
|
Loading…
Reference in a new issue