[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/43: haskell-build-system: register: Remove references to the doc outp
From: |
guix-commits |
Subject: |
07/43: haskell-build-system: register: Remove references to the doc output. |
Date: |
Sat, 8 Aug 2020 22:41:06 -0400 (EDT) |
samplet pushed a commit to branch wip-haskell-updates-2
in repository guix.
commit 59bb3c67b682b8f820cb4efbbd3eac554079b73c
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Jun 16 22:34:37 2020 +0200
haskell-build-system: register: Remove references to the doc output.
* guix/build/haskell-build-system.scm (register): Strip references to the
doc
output from the generated package config files; move the haddock files from
the "doc" output to the "lib" output.
---
guix/build/haskell-build-system.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index 86681bb..d587962 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -244,6 +244,7 @@ given Haskell package."
(loop seen tail))))))
(let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
(haskell (assoc-ref inputs "haskell"))
(name-verion (strip-store-file-name haskell))
(lib (string-append (or (assoc-ref outputs "lib") out) "/lib"))
@@ -258,8 +259,25 @@ given Haskell package."
;; The conf file is created only when there is a library to register.
(when (file-exists? config-file)
(mkdir-p config-dir)
- (let* ((config-file-name+id
- (call-with-ascii-input-file config-file (cut grep id-rx <>))))
+ (let ((config-file-name+id
+ (call-with-ascii-input-file config-file (cut grep id-rx <>))))
+
+ ;; Remove reference to "doc" output from "lib" (or "out") by rewriting
the
+ ;; "haddock-interfaces" field and removing the optional "haddock-html"
+ ;; field in the generated .conf file.
+ (when doc
+ (substitute* config-file
+ (("^haddock-html: .*") "\n")
+ (((format #f "^haddock-interfaces: ~a" doc))
+ (string-append "haddock-interfaces: " lib)))
+ ;; Move the referenced file to the "lib" (or "out") output.
+ (match (find-files doc "\\.haddock$")
+ ((haddock-file . rest)
+ (let* ((subdir (string-drop haddock-file (string-length doc)))
+ (new (string-append lib subdir)))
+ (mkdir-p (dirname new))
+ (rename-file haddock-file new)))
+ (_ #f)))
(install-transitive-deps config-file %tmp-db-dir config-dir)
(rename-file config-file
(string-append config-dir "/"
- branch wip-haskell-updates-2 created (now 2e60a66), guix-commits, 2020/08/08
- 01/43: gnu: Add ghc-8.8., guix-commits, 2020/08/08
- 02/43: build-system/haskell: Support parallel builds., guix-commits, 2020/08/08
- 06/43: haskell-build-system: register: Respect lib output., guix-commits, 2020/08/08
- 03/43: build-system/haskell: Refactor configure step., guix-commits, 2020/08/08
- 04/43: build-system/haskell: Configure to link with shared libraries., guix-commits, 2020/08/08
- 05/43: build-system/haskell: Add default output "static"., guix-commits, 2020/08/08
- 07/43: haskell-build-system: register: Remove references to the doc output.,
guix-commits <=
- 08/43: build-system/haskell: Add 'extra-directories' keyword., guix-commits, 2020/08/08
- 09/43: build-system/haskell: Do not pass "--bindir" during configure., guix-commits, 2020/08/08
- 10/43: gnu: Add "static" output to Haskell packages with custom outputs., guix-commits, 2020/08/08
- 11/43: gnu: ghc-8.6: Remove unnecessary references., guix-commits, 2020/08/08
- 12/43: gnu: ghc-hspec: Add "doc" output., guix-commits, 2020/08/08
- 14/43: gnu: ghc-cryptonite: Add "doc" output., guix-commits, 2020/08/08
- 15/43: gnu: ghc-blaze-html: Add "doc" output., guix-commits, 2020/08/08
- 16/43: gnu: ghc-aeson: Add "doc" output., guix-commits, 2020/08/08
- 19/43: gnu: ghc-basement: Add "doc" output., guix-commits, 2020/08/08
- 18/43: gnu: ghc-base-compat: Add "doc" output., guix-commits, 2020/08/08