GNU bug report logs - #42159
[PATCH] gnu: git-annex: Build and install man pages.

Previous Next

Package: guix-patches;

Reported by: Kyle Meyer <kyle <at> kyleam.com>

Date: Thu, 2 Jul 2020 00:52:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42159 in the body.
You can then email your comments to 42159 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42159; Package guix-patches. (Thu, 02 Jul 2020 00:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kyle Meyer <kyle <at> kyleam.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 02 Jul 2020 00:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kyle Meyer <kyle <at> kyleam.com>
To: guix-patches <at> gnu.org
Cc: Kyle Meyer <kyle <at> kyleam.com>
Subject: [PATCH] gnu: git-annex: Build and install man pages.
Date: Wed,  1 Jul 2020 20:50:41 -0400
* 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(-)

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 <at> systemreboot.net>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2015 Paul van der Walt <paul <at> denknerd.org>
-;;; Copyright © 2019 Kyle Meyer <kyle <at> kyleam.com>
+;;; Copyright © 2019, 2020 Kyle Meyer <kyle <at> kyleam.com>
 ;;; Copyright © 2015 John Soo <jsoo1 <at> asu.edu>
 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Alex Griffin <a <at> 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





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 02 Jul 2020 07:52:01 GMT) Full text and rfc822 format available.

Notification sent to Kyle Meyer <kyle <at> kyleam.com>:
bug acknowledged by developer. (Thu, 02 Jul 2020 07:52:01 GMT) Full text and rfc822 format available.

Message #10 received at 42159-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: 42159-done <at> debbugs.gnu.org
Subject: Re: [bug#42159] [PATCH] gnu: git-annex: Build and install man pages.
Date: Thu, 2 Jul 2020 10:50:33 +0300
[Message part 1 (text/plain, inline)]
Looks good! I was missing the man pages.

Patch pushed.


-- 
Efraim Flashner   <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Jul 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.