@@ -343,7 +343,7 @@ (define-public shepherd-0.9
(sha256
(base32 "1pvdpx2mfki8wvhcac54p8fn5idqszicww60ikswszz2cv5d0s11"))))
(arguments
- (list #:configure-flags #~'("--localstatedir=/var")
+ (list #:configure-flags #~'("HELP2MAN=true --localstatedir=/var")
#:make-flags #~'("GUILE_AUTO_COMPILE=0")
#:phases (if (%current-target-system)
#~(modify-phases %standard-phases
@@ -359,17 +359,45 @@ (define-public shepherd-0.9
(("%FIBERS_OBJECT_DIRECTORY%")
#$(file-append
(this-package-input "guile-fibers")
- "/lib/guile/3.0/site-ccache"))))))
+ "/lib/guile/3.0/site-ccache")))))
+ (add-after 'configure 'copy-man-pages
+ (lambda* (#:key outputs native-inputs #:allow-other-keys)
+ ;; Cannot run help2man when cross-compiling,
+ ;; so let's copy the man pages from the native
+ ;; build.
+ (let ((gzip (search-input-file native-inputs
+ "bin/gzip")))
+ ;; TODO
+ (pk #$(file-append
+ (this-package-input this-package)
+ "/man/shepherd.1.gz"))
+ (invoke gzip "--decompress" "--stdout"
+ #$(file-append
+ (this-package-input this-package)
+ "/man/shepherd.1.gz")
+ ">doc/shepherd.1"))
+ #;(copy-file #$(file-append
+ (this-package-input this-package)
+ "/man/shepherd.1")
+ (string-append
+ (assoc-ref outputs "out")
+ "/man/shepherd.1"))
+ #f)))
#~%standard-phases)))
(native-inputs
- (list autoconf
- automake
- gettext-minimal
- guile-3.0
- guile-fibers-1.1 ; for cross-compilation
- help2man
- pkg-config
- texinfo))
+ (cons* autoconf
+ automake
+ gettext-minimal
+ guile-3.0
+ guile-fibers-1.1 ; for cross-compilation
+ help2man
+ pkg-config
+ texinfo
+ ;; for the help2man man page when cross-compiling
+ (if (%current-target-system)
+ (list gzip
+ this-package)
+ '())))
(inputs (list guile-3.0
guile-fibers-1.1))))