aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-11-08 09:25:24 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-11-08 09:27:24 +0200
commite8739da12e3cf9bc0477c3df65875de6a64d74c5 (patch)
tree2a5ef99764d6d0276c2ca6cdd717a17145220103 /gnu/packages
parent5da6e8961cad0e51b3a9ae7a0d5c384a08db1d78 (diff)
downloadguix-e8739da12e3cf9bc0477c3df65875de6a64d74c5.tar.gz
guix-e8739da12e3cf9bc0477c3df65875de6a64d74c5.zip
gnu: git-lfs: Support building on more systems.
* gnu/packages/version-control.scm (git-lfs)[arguments]: Only run man-page related phases when ruby-asciidoctor is available. [native-inputs]: Only include ronn-ng, ruby-asciidoctor when building on a platform which has support for ruby-asciidoctor. Change-Id: Icbf8416998dc5d1f9d7c8299b4f929380dc29165
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/version-control.scm45
1 files changed, 26 insertions, 19 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 76fa8ef5d0..cf9a2f7a4c 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3188,26 +3188,33 @@ will reconstruct the object along its delta-base chain and return it.")
#$(file-append (this-package-input "go-golang-org-x-net")
"/src/golang.org/x/net/publicsuffix/data")
"src/golang.org/x/net/publicsuffix/data")))
- (add-before 'build 'man-gen
- ;; Without this, the binary generated in 'build
- ;; phase won't have any embedded usage-text.
- (lambda _
- (with-directory-excursion "src/github.com/git-lfs/git-lfs"
- (invoke "make" "mangen"))))
- (add-after 'build 'build-man-pages
- (lambda _
- (with-directory-excursion "src/github.com/git-lfs/git-lfs"
- (invoke "make" "man"))))
- (add-after 'install 'install-man-pages
- (lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
- (for-each
- (lambda (manpage)
- (install-file manpage
- (string-append #$output "/share/man/man1")))
- (find-files "." "^git-lfs.*\\.1$"))))))))
+ ;; Only build the man pages if ruby-asciidoctor is available.
+ #$@(if (this-package-native-input "ruby-asciidoctor")
+ #~((add-before 'build 'man-gen
+ ;; Without this, the binary generated in 'build
+ ;; phase won't have any embedded usage-text.
+ (lambda _
+ (with-directory-excursion "src/github.com/git-lfs/git-lfs"
+ (invoke "make" "mangen"))))
+ (add-after 'build 'build-man-pages
+ (lambda _
+ (with-directory-excursion "src/github.com/git-lfs/git-lfs"
+ (invoke "make" "man"))))
+ (add-after 'install 'install-man-pages
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
+ (for-each
+ (lambda (manpage)
+ (install-file manpage
+ (string-append #$output "/share/man/man1")))
+ (find-files "." "^git-lfs.*\\.1$"))))))
+ #~()))))
;; make `ronn` available during build for man page generation
- (native-inputs (list ronn-ng git-minimal ruby-asciidoctor))
+ (native-inputs
+ (append (list git-minimal)
+ (if (supported-package? ruby-asciidoctor)
+ (list ronn-ng ruby-asciidoctor)
+ '())))
(propagated-inputs
(list go-github-com-xeipuuv-gojsonschema
go-github-com-xeipuuv-gojsonreference