summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-11-19 09:41:05 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-11-19 09:41:05 +0200
commitd87ce1a336c24bdd7e1692d989a1d419e7410d23 (patch)
tree47b96de2f7ac7b2ccc1190d36ee450ca46167602 /gnu/packages
parentf7ef5a7f46b4131723014e80d48491cee58cbb9c (diff)
downloadguix-d87ce1a336c24bdd7e1692d989a1d419e7410d23.tar.gz
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/haskell-apps.scm28
1 files 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"))