[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/44: gnu: ghc-8.6: Remove unnecessary references.
From: |
guix-commits |
Subject: |
11/44: gnu: ghc-8.6: Remove unnecessary references. |
Date: |
Fri, 17 Jul 2020 08:33:32 -0400 (EDT) |
rekado pushed a commit to branch wip-haskell-updates
in repository guix.
commit 9e86e4b61b2bfe1d38b4d26eef1ac9c37c577d14
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Jun 26 15:17:31 2020 +0200
gnu: ghc-8.6: Remove unnecessary references.
* gnu/packages/haskell.scm (ghc-8.6)[arguments]: Add phase
"remove-unnecessary-references" to remove references to build tools and
inter-output references.
---
gnu/packages/haskell.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 78cb895..09732fc 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus
<rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus
<rekado@elephly.net>
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
@@ -568,6 +568,32 @@ interactive environment for the functional language
Haskell.")
,make-flags))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
+ (add-after 'install 'remove-unnecessary-references
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (find-files (string-append (assoc-ref outputs
"out") "/lib/")
+ "settings")
+ (("/gnu/store/.*/bin/(.*)" m program) program))
+
+ ;; Remove references to "doc" output from "out" by rewriting
+ ;; the "haddock-interfaces" fields and removing the optional
+ ;; "haddock-html" field in the generated .conf files.
+ (let ((doc (assoc-ref outputs "doc"))
+ (out (assoc-ref outputs "out")))
+ (with-fluids ((%default-port-encoding #f))
+ (for-each (lambda (config-file)
+ (substitute* config-file
+ (("^haddock-html: .*") "\n")
+ (((format #f "^haddock-interfaces: ~a" doc))
+ (string-append "haddock-interfaces: " out))))
+ (find-files (string-append out "/lib") ".conf")))
+ ;; Move the referenced files to the "out" output.
+ (for-each (lambda (haddock-file)
+ (let* ((subdir (string-drop haddock-file
(string-length doc)))
+ (new (string-append out subdir)))
+ (mkdir-p (dirname new))
+ (rename-file haddock-file new)))
+ (find-files doc "\\.haddock$")))
+ #t))
(add-after 'unpack-testsuite 'skip-tests
(lambda _
;; These two tests refer to the root user, which doesn't exist
- 13/44: gnu: ghc-crypto-api-tests: Add "doc" output., (continued)
- 13/44: gnu: ghc-crypto-api-tests: Add "doc" output., guix-commits, 2020/07/17
- 12/44: gnu: ghc-hspec: Add "doc" output., guix-commits, 2020/07/17
- 14/44: gnu: ghc-cryptonite: Add "doc" output., guix-commits, 2020/07/17
- 16/44: gnu: ghc-aeson: Add "doc" output., guix-commits, 2020/07/17
- 07/44: build-system/haskell: Configure to link with shared libraries., guix-commits, 2020/07/17
- 05/44: haskell-build-system: register: Remove references to the doc output., guix-commits, 2020/07/17
- 09/44: gnu: ghc-libyaml: Add libyaml via --extra-lib-dirs., guix-commits, 2020/07/17
- 21/44: gnu: ghc-cmdargs: Add "doc" output., guix-commits, 2020/07/17
- 22/44: gnu: ghc-conduit: Add "doc" output., guix-commits, 2020/07/17
- 10/44: gnu: ghc-hslua: Add --extra-lib-dirs configure option., guix-commits, 2020/07/17
- 11/44: gnu: ghc-8.6: Remove unnecessary references.,
guix-commits <=
- 15/44: gnu: ghc-blaze-html: Add "doc" output., guix-commits, 2020/07/17
- 17/44: gnu: ghc-hxt: Add "doc" output., guix-commits, 2020/07/17
- 18/44: gnu: ghc-base-compat: Add "doc" output., guix-commits, 2020/07/17
- 20/44: gnu: ghc-base-prelude: Add "doc" output., guix-commits, 2020/07/17
- 19/44: gnu: ghc-basement: Add "doc" output., guix-commits, 2020/07/17
- 23/44: gnu: ghc-foldl: Add "doc" output., guix-commits, 2020/07/17
- 24/44: gnu: ghc-foundation: Add "doc" output., guix-commits, 2020/07/17
- 25/44: gnu: ghc-free: Add "doc" output., guix-commits, 2020/07/17
- 26/44: gnu: ghc-generic-deriving: Add "doc" output., guix-commits, 2020/07/17
- 33/44: gnu: ghc-profunctors: Add "doc" output., guix-commits, 2020/07/17