[PATCH] gnu: git-annex: Build and install man pages.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Kyle Meyer
Owner
unassigned
Submitted by
Kyle Meyer
Severity
normal

Debbugs page

Kyle Meyer wrote 5 years ago
(address . guix-patches@gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20200702005041.11965-1-kyle@kyleam.com
* gnu/packages/haskell-apps.scm (git-annex)[arguments]: Add phases for
building and installing the man pages.
[native-inputs]: Add perl.
---
gnu/packages/haskell-apps.scm | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)

Toggle diff (71 lines)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index f8bee424c3..5b6f0401e4 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
-;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
+;;; Copyright © 2019, 2020 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2015 John Soo <jsoo1@asu.edu>
;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
@@ -370,8 +370,7 @@ (define-public git-annex
;; Factor out necessary build logic from the provided
;; `Setup.hs' script. The script as-is does not work because
;; it cannot find its dependencies, and there is no obvious way
- ;; to tell it where to look. Note that we do not preserve the
- ;; code that installs man pages here.
+ ;; to tell it where to look.
(call-with-output-file "PreConf.hs"
(lambda (out)
(format out "import qualified Build.Configure as Configure~%")
@@ -385,6 +384,18 @@ (define-public git-annex
(lambda _
(invoke "runhaskell" "PreConf.hs")
#t))
+ (add-after 'build 'build-manpages
+ (lambda _
+ ;; The Setup.hs rewrite above removed custom code for building
+ ;; the man pages. In addition to that code, git-annex's source
+ ;; tree has a file that's not included in the tarball but is used
+ ;; by the Makefile to build man pages. Copy the core bits here.
+ (call-with-output-file "Build/MakeMans.hs"
+ (lambda (out)
+ (format out "module Main where~%")
+ (format out "import Build.Mans~%")
+ (format out "main = buildMansOrWarn~%")))
+ (invoke "runhaskell" "Build/MakeMans.hs")))
(replace 'check
(lambda _
;; We need to set the path so that Git recognizes
@@ -400,6 +411,14 @@ (define-public git-annex
;; Undo `patch-shell-for-tests'.
(copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
(apply (assoc-ref %standard-phases 'build) args)))
+ (add-after 'install 'install-manpages
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((man (string-append (assoc-ref outputs "out")
+ "/man/man1/")))
+ (mkdir-p man)
+ (for-each (lambda (file) (install-file file man))
+ (find-files "man")))
+ #t))
(add-after 'install 'install-symlinks
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -465,7 +484,8 @@ (define-public git-annex
`(("ghc-tasty" ,ghc-tasty)
("ghc-tasty-hunit" ,ghc-tasty-hunit)
("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
- ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
+ ("ghc-tasty-rerun" ,ghc-tasty-rerun)
+ ("perl" ,perl)))
(home-page "https://git-annex.branchable.com/")
(synopsis "Manage files with Git, without checking in their contents")
(description "This package allows managing files with Git, without

base-commit: 67ba9815c954d6ccef041d5dbbe2b2ba14f37474
--
2.27.0.383.g050319c2ae
Efraim Flashner wrote 5 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 42159-done@debbugs.gnu.org)
20200702075033.GG6387@E5400
Looks good! I was missing the man pages.

Patch pushed.


--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl79kcYACgkQQarn3Mo9
g1EKNxAArY95FNSGmKo8ZkOsLC2TzngOtciT03ZPyA+IPKcJK/CRMmXSx9fteqcT
SJ/aql+acnI5wm7s31odEF+XUtutjXXIscaqQiTbQLYWEJ7bhFlcPBq+/dbPemoi
iCvJDtOL77vTnJjPYHtdvGTO+cIkuqnuIsKVfSnKyHopNLTICEk76144Rd5B/U7Q
wfxdPEtAOhbalE+vUqtXeOsjRXSFWvxjMw8yXzEPIQwZ0+51+f/7RjOVrifOWm3k
iwPPgvw5ZGw9Hnu124SexvbsQMbxRBY23Ng7iPeI2VjYP8+kF8hRKeuo9aPW4ZnP
brtDCvIAmKdrltJyZeoRTFyymB/XERMrtDDPAfjdZlUY0Y7MbEKqvOa6xq6p7+Qd
8IYxl7gBwryiGwT4haEafoGO7YhtmKqbAPqvAR015zEWahpe6vmEmbPYIuQunJV4
sCic7WOAxQZP8sG+Y++hNj8/u15EVF3EFNy/Jfte/hKj6r4De5ts0EK3EMG6uoba
0ivvdnhE4Hwv2uQ0/gEhhLHdCfjQBV96uhxmBQZFJU7OVYpVE0OQ4V7/tyuyYdJ8
PjD2GSiu8sw4CM/GGlOEbA3HiXtqQlpxKKY/oenltLvZR0mT2DC2qQbwEu0pHNo8
JC3GHknAg6WPRpoNHGrnrp2UuKtiiwLnXFAXuPxRXNSUZ1c/caU=
=Ih35
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 42159@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42159
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help