mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-17 04:07:10 -05:00
build-system/haskell: Refactor configure step.
* guix/build/haskell-build-system.scm (configure): Replace append with quasiquotes and splicing.
This commit is contained in:
parent
67cb9fa235
commit
0347888a7e
1 changed files with 16 additions and 19 deletions
|
@ -85,25 +85,22 @@ (define* (configure #:key outputs inputs tests? (configure-flags '())
|
|||
dir)
|
||||
(_ '())))
|
||||
(ghc-path (getenv "GHC_PACKAGE_PATH"))
|
||||
(params (append `(,(string-append "--prefix=" out))
|
||||
`(,(string-append "--libdir=" (or lib out) "/lib"))
|
||||
`(,(string-append "--bindir=" (or bin out) "/bin"))
|
||||
`(,(string-append
|
||||
"--docdir=" (or doc out)
|
||||
"/share/doc/" name-version))
|
||||
'("--libsubdir=$compiler/$pkg-$version")
|
||||
`(,(string-append "--package-db=" %tmp-db-dir))
|
||||
'("--global")
|
||||
`(,@(map
|
||||
(cut string-append "--extra-include-dirs=" <>)
|
||||
(search-path-as-list '("include") input-dirs)))
|
||||
`(,@(map
|
||||
(cut string-append "--extra-lib-dirs=" <>)
|
||||
(search-path-as-list '("lib") input-dirs)))
|
||||
(if tests?
|
||||
'("--enable-tests")
|
||||
'())
|
||||
configure-flags)))
|
||||
(params `(,(string-append "--prefix=" out)
|
||||
,(string-append "--libdir=" (or lib out) "/lib")
|
||||
,(string-append "--bindir=" (or bin out) "/bin")
|
||||
,(string-append "--docdir=" (or doc out)
|
||||
"/share/doc/" name-version)
|
||||
"--libsubdir=$compiler/$pkg-$version"
|
||||
,(string-append "--package-db=" %tmp-db-dir)
|
||||
"--global"
|
||||
,@(map (cut string-append "--extra-include-dirs=" <>)
|
||||
(search-path-as-list '("include") input-dirs))
|
||||
,@(map (cut string-append "--extra-lib-dirs=" <>)
|
||||
(search-path-as-list '("lib") input-dirs))
|
||||
,@(if tests?
|
||||
'("--enable-tests")
|
||||
'())
|
||||
,@configure-flags)))
|
||||
;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset
|
||||
;; and restore it.
|
||||
(unsetenv "GHC_PACKAGE_PATH")
|
||||
|
|
Loading…
Reference in a new issue