guix-commits
[Top][All Lists]
Advanced

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

03/04: build-system/haskell: install config for any package that creates


From: Eric Bavier
Subject: 03/04: build-system/haskell: install config for any package that creates it.
Date: Fri, 12 Jun 2015 05:54:40 +0000

bavier pushed a commit to branch master
in repository guix.

commit 6508ce55e95b0472b2212befcb56919eb44fb41c
Author: Eric Bavier <address@hidden>
Date:   Sat Jun 6 07:28:57 2015 -0500

    build-system/haskell: install config for any package that creates it.
    
    A Cabal package is allowed to declare an "empty" library, in an
    otherwise executable-only package, for the purpose of allowing Cabal
    to use it as a dependency for other packages.  See e.g. hspec-discover.
    
    * guix/build/haskell-build-system.scm (register): Unconditionally call
      setup script with "register", and install any config file generated.
---
 guix/build/haskell-build-system.scm |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/build/haskell-build-system.scm 
b/guix/build/haskell-build-system.scm
index d382ee4..c0cb789 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -166,13 +166,13 @@ generate the cache as it would clash in user profiles."
                                     (package-name-version haskell)
                                     "/package.conf.d"))
          (id-rx (make-regexp "^id: *(.*)$"))
-         (lib-rx (make-regexp "lib.*\\.(a|so)"))
-         (config-file (string-append config-dir "/" name ".conf"))
+         (config-file (string-append out "/" name ".conf"))
          (params
           (list (string-append "--gen-pkg-config=" config-file))))
-    (unless (null? (find-files lib lib-rx))
+    (run-setuphs "register" params)
+    ;; The conf file is created only when there is a library to register.
+    (when (file-exists? config-file)
       (mkdir-p config-dir)
-      (run-setuphs "register" params)
       (let ((config-file-name+id
              (call-with-ascii-input-file config-file (cut grep id-rx <>))))
         (rename-file config-file



reply via email to

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