guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/08: gnu: git-annex: Install manpages.


From: guix-commits
Subject: 02/08: gnu: git-annex: Install manpages.
Date: Sun, 19 Nov 2023 03:50:31 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit d87ce1a336c24bdd7e1692d989a1d419e7410d23
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Nov 19 09:41:05 2023 +0200

    gnu: git-annex: Install manpages.
    
    * gnu/packages/haskell-apps.scm (git-annex)[source]: Download using
    git-fetch.
    [arguments]: Rewrite 'build-manpages and 'install-manpages to use the
    Makefile.
    
    Change-Id: I58e58382e6d8c57830aa5ddb40f02cf949089aa1
---
 gnu/packages/haskell-apps.scm | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index ac22082088..e265dc0e7b 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -297,10 +297,14 @@ to @code{cabal repl}).")
     (version "10.20230828")
     (source
      (origin
-       (method url-fetch)
-       (uri (hackage-uri "git-annex" version))
+       ;; hackage release doesn't include everything needed for extra bits.
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://git.joeyh.name/git/git-annex.git";)
+              (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "0pb6834dwjs9kdki977rfkdyg58dfzy8wfwvswrz3n7h6bcnjd0b"))))
+        (base32 "1k13mspwlpw6wwnf0cjlqcy3563kyprc6s5parrmsh07dysff7fi"))))
     (build-system haskell-build-system)
     (properties '((upstream-name . "git-annex")))
     (arguments
@@ -348,16 +352,7 @@ to @code{cabal repl}).")
              (invoke "runhaskell" "PreConf.hs")))
          (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")))
+             (invoke "make" "mans")))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              ;; We need to set the path so that Git recognizes
@@ -375,11 +370,8 @@ to @code{cabal repl}).")
              (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")))))
+             (setenv "PREFIX" (assoc-ref outputs "out"))
+             (invoke "make" "install-mans")))
          (add-after 'install 'install-symlinks
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]