Skip to content
Snippets Groups Projects
Commit 6508ce55 authored by Eric Bavier's avatar Eric Bavier
Browse files

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.
parent b4b1fe9d
No related branches found
No related tags found
No related merge requests found
......@@ -166,13 +166,13 @@ (define* (register #:key name system inputs outputs #:allow-other-keys)
(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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment