gnu: idris: Use cc-for-target.

* gnu/packages/idris.scm (idris)[arguments]: Use cc-for-target in place of
"gcc".
This commit is contained in:
Eric Bavier 2022-04-18 22:40:10 -05:00
parent b2a66e1071
commit ae6cd99573
No known key found for this signature in database
GPG key ID: BC45CA67E2F8D007

View file

@ -32,6 +32,7 @@ (define-module (gnu packages idris)
#:use-module (guix build-system haskell)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))
@ -103,7 +104,7 @@ (define-public idris
dep))))
(add-before 'configure 'set-cc-command
(lambda _
(setenv "CC" "gcc")))
(setenv "CC" ,(cc-for-target))))
(add-after 'install 'fix-libs-install-location
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@ -120,7 +121,7 @@ (define-public idris
(let ((out (assoc-ref outputs "out")))
(chmod "test/scripts/timeout" #o755) ;must be executable
(setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count)))
(setenv "IDRIS_CC" "gcc") ;Needed for creating executables
(setenv "IDRIS_CC" ,(cc-for-target)) ;Needed for creating executables
(setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
(apply (assoc-ref %standard-phases 'check) args))))
(add-before 'check 'restore-libidris_rts