guix_mirror_bot pushed a commit to branch haskell-team
in repository guix.

commit f539fda12ccbad2fb68f9f7b433e435bf9077903
Author: Nicolas Graves <[email protected]>
AuthorDate: Mon Aug 10 16:15:35 2026 +0200

    build-system: haskell: Avoid use of "haskell" input label.
    
    * guix/build/haskell-build-system.scm (setup-compiler)
    (make-ghc-package-database, install-config-file): Use
    search-input-file and readlink rather than "haskell" input label.
    
    Signed-off-by: Andreas Enge <[email protected]>
    Merges: guix/guix#10469
---
 guix/build/haskell-build-system.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/guix/build/haskell-build-system.scm 
b/guix/build/haskell-build-system.scm
index 8e0311213e8..a42ca4d6ca2 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -134,8 +134,8 @@ and parameters ~s~%"
 
 (define* (setup-compiler #:key system inputs outputs #:allow-other-keys)
   "Setup the compiler environment."
-  (let* ((haskell (assoc-ref inputs "haskell"))
-         (name-version (strip-store-file-name haskell)))
+  (let* ((ghc (search-input-file inputs "bin/ghc"))
+         (name-version (basename (readlink ghc))))
     (cond
      ((string-match "ghc" name-version)
       (make-ghc-package-database system inputs outputs))
@@ -151,8 +151,8 @@ and parameters ~s~%"
 
 (define (make-ghc-package-database system inputs outputs)
   "Generate the GHC package database."
-  (let* ((haskell  (assoc-ref inputs "haskell"))
-         (name-version (strip-store-file-name haskell))
+  (let* ((ghc (search-input-file inputs "bin/ghc"))
+         (name-version (basename (readlink ghc)))
          ;; Silence 'find-files' (see 'evaluate-search-paths')
          (conf-dirs (search-path-as-string->list (getenv "GHC_PACKAGE_PATH")))
          (conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs)))
@@ -253,8 +253,8 @@ given Haskell package."
 
   (let* ((out (assoc-ref outputs "out"))
          (doc (assoc-ref outputs "doc"))
-         (haskell  (assoc-ref inputs "haskell"))
-         (name-version (strip-store-file-name haskell))
+         (ghc (search-input-file inputs "bin/ghc"))
+         (name-version (basename (readlink ghc)))
          (version (last (string-split name-version #\-)))
          (lib (string-append (or (assoc-ref outputs "lib") out) "/lib"))
          (config-dir (string-append lib

Reply via email to