guix-commits
[Top][All Lists]
Advanced

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

42/44: gnu: ghc-http: Prevent embedding of spurious references.


From: guix-commits
Subject: 42/44: gnu: ghc-http: Prevent embedding of spurious references.
Date: Mon, 29 Jun 2020 07:15:30 -0400 (EDT)

rekado pushed a commit to branch wip-haskell-updates
in repository guix.

commit 87896c1254f4b467766d0e89a5639f5fe8cb9443
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sat Jun 27 22:36:14 2020 +0200

    gnu: ghc-http: Prevent embedding of spurious references.
    
    * gnu/packages/haskell-web.scm (ghc-http)[arguments]: Add build phase
    "create-simple-paths-module" to avoid retaining unnecessary references.
---
 gnu/packages/haskell-web.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index cb40b24..06264e6 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -197,7 +197,23 @@ both client and server code).")
        ("ghc-network-uri" ,ghc-network-uri)
        ("ghc-split" ,ghc-split)))
     (arguments
-     `(#:tests? #f)) ; FIXME: currently missing libraries used for tests.
+     `(#:tests? #f  ; FIXME: currently missing libraries used for tests.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'create-simple-paths-module
+           (lambda _
+             (call-with-output-file "Paths_HTTP.hs"
+               (lambda (port)
+                 (format port "\
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE NoRebindableSyntax #-}
+{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
+module Paths_HTTP (version) where
+import Data.Version (Version(..))
+version :: Version
+version = Version [~a] []
+" (string-map (lambda (chr) (if (eq? chr #\.) #\, chr)) ,version))))
+             #t)))))
     (home-page "https://github.com/haskell/HTTP";)
     (synopsis "Library for client-side HTTP")
     (description



reply via email to

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