[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/24: build-system/haskell: Do not rely on compiler name.
From: |
guix-commits |
Subject: |
06/24: build-system/haskell: Do not rely on compiler name. |
Date: |
Thu, 7 Oct 2021 09:21:13 -0400 (EDT) |
lbraun pushed a commit to branch wip-haskell
in repository guix.
commit 1c0c5b2251bfca960ef5f20ea38d6d06ea8d4f97
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Fri Sep 17 08:55:08 2021 +0200
build-system/haskell: Do not rely on compiler name.
We’ve been relying on the compiler name matching its package
subdir. Since we effectively only support GHC we can hard-code this and
avoid issues with “ghc-next”.
* guix/build/haskell-build-system.scm (make-ghc-package-database):
Use GHC_PACKAGE_PATH.
(register): Hard-code ghc prefix.
---
guix/build/haskell-build-system.scm | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index 171100e..7d50bae 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -175,15 +175,8 @@ first match and return the content of the group."
"Generate the GHC package database."
(let* ((haskell (assoc-ref inputs "haskell"))
(name-version (strip-store-file-name haskell))
- (input-dirs (match inputs
- (((_ . dir) ...)
- dir)
- (_ '())))
;; Silence 'find-files' (see 'evaluate-search-paths')
- (conf-dirs (with-null-error-port
- (search-path-as-list
- `(,(string-append "lib/" name-version))
- input-dirs #:pattern ".*\\.conf.d$")))
+ (conf-dirs (search-path-as-string->list (getenv "GHC_PACKAGE_PATH")))
(conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs)))
(mkdir-p %tmp-db-dir)
(for-each (lambda (file)
@@ -243,10 +236,11 @@ given Haskell package."
(let* ((out (assoc-ref outputs "out"))
(doc (assoc-ref outputs "doc"))
(haskell (assoc-ref inputs "haskell"))
- (name-verion (strip-store-file-name haskell))
+ (name-version (strip-store-file-name haskell))
+ (version (last (string-split name-version #\-)))
(lib (string-append (or (assoc-ref outputs "lib") out) "/lib"))
(config-dir (string-append lib
- "/" name-verion
+ "/ghc-" version
"/" name ".conf.d"))
(id-rx (make-regexp "^id: *(.*)$"))
(config-file (string-append out "/" name ".conf"))
- 12/24: gnu: hedgewars: Fix build., (continued)
- 12/24: gnu: hedgewars: Fix build., guix-commits, 2021/10/07
- 16/24: gnu: ngless: Fix build., guix-commits, 2021/10/07
- 18/24: gnu: ghc-repline: Remove version 0.2.0.0., guix-commits, 2021/10/07
- 15/24: gnu: idris: Fix build., guix-commits, 2021/10/07
- 21/24: gnu: pigx-sars-cov2-ww: Remove dependency on pandoc-citeproc., guix-commits, 2021/10/07
- 14/24: gnu: ghc-silently: Remove unused input., guix-commits, 2021/10/07
- 03/24: import: stackage: Update %default-lts-version to 18.10., guix-commits, 2021/10/07
- 04/24: import: hackage: Update GHC’s standard libraries., guix-commits, 2021/10/07
- 07/24: build-system/haskell: Accept line breaks in config files., guix-commits, 2021/10/07
- 08/24: import: hackage: Support mirror:// URLs, guix-commits, 2021/10/07
- 06/24: build-system/haskell: Do not rely on compiler name.,
guix-commits <=
- 13/24: gnu: ruby-pandoc-ruby: Disable tests., guix-commits, 2021/10/07
- 20/24: gnu: pigx-bsseq: Remove dependency on pandoc-citeproc., guix-commits, 2021/10/07
- 17/24: gnu: python-pypandoc: Upgrade to 1.6.4., guix-commits, 2021/10/07
- 19/24: gnu: ghc-haskeline: Remove version postfix from variable name., guix-commits, 2021/10/07
- 24/24: gnu: pigx-scrnaseq: Remove dependency on pandoc-citeproc., guix-commits, 2021/10/07
- 22/24: gnu: pigx-chipseq: Remove dependency on pandoc-citeproc., guix-commits, 2021/10/07
- 23/24: gnu: pigx-rnaseq: Remove dependency on pandoc-citeproc., guix-commits, 2021/10/07