me
/
guix
Archived
1
0
Fork 0

gnu: ghc-7: Rewrite arguments using G-expressions.

* gnu/packages/haskell.scm (ghc-7)[arguments]: Rewrite using
G-expressions. Remove trailing #t from phases.
master
Efraim Flashner 2022-08-21 12:17:06 +03:00
parent 213c60f332
commit 7032e0bc8a
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 101 additions and 105 deletions

View File

@ -444,7 +444,8 @@ libraries are included in this package.")
ghc-bootstrap-x86_64-7.8.4
ghc-bootstrap-i686-7.8.4))))
(arguments
`(#:test-target "test"
(list
#:test-target "test"
;; We get a smaller number of test failures by disabling parallel test
;; execution.
#:parallel-tests? #f
@ -454,12 +455,12 @@ libraries are included in this package.")
;; then complains that they don't match.
#:build #f
#:modules ((guix build gnu-build-system)
#:modules '((guix build gnu-build-system)
(guix build utils)
(srfi srfi-26)
(srfi srfi-1))
#:configure-flags
(list
#~(list
(string-append "--with-gmp-libraries="
(assoc-ref %build-inputs "gmp") "/lib")
(string-append "--with-gmp-includes="
@ -474,12 +475,19 @@ libraries are included in this package.")
;; #:make-flags
;; (list "BUILD_DOCBOOK_HTML = YES")
#:phases
(let* ((ghc-bootstrap-path
(string-append (getcwd) "/" ,name "-" ,version "/ghc-bin"))
#~(let* ((ghc-bootstrap-path
(string-append (getcwd) "/" #$name "-" #$version "/ghc-bin"))
(ghc-bootstrap-prefix
(string-append ghc-bootstrap-path "/usr" )))
(alist-cons-after
'unpack-bin 'unpack-testsuite-and-fix-bins
(modify-phases %standard-phases
(add-after 'unpack 'unpack-bin
(lambda* (#:key inputs outputs #:allow-other-keys)
(mkdir-p ghc-bootstrap-prefix)
(with-directory-excursion ghc-bootstrap-path
(copy-file (assoc-ref inputs "ghc-binary")
"ghc-bin.tar.xz")
(invoke "tar" "xvf" "ghc-bin.tar.xz"))))
(add-after 'unpack-bin 'unpack-testsuite-and-fix-bins
(lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion ".."
(copy-file (assoc-ref inputs "ghc-testsuite")
@ -493,19 +501,14 @@ libraries are included in this package.")
"testsuite/tests/programs/life_space_leak/life.test"
"libraries/process/System/Process/Internals.hs"
"libraries/unix/cbits/execvpe.c")
(("/bin/sh") (which "sh"))
(("/bin/rm") "rm"))
#t)
(alist-cons-after
'unpack 'unpack-bin
(("/bin/sh") (search-input-file inputs "/bin/sh"))
(("/bin/rm") "rm"))))
(add-before 'configure 'install-bin
(lambda* (#:key inputs outputs #:allow-other-keys)
(mkdir-p ghc-bootstrap-prefix)
(with-directory-excursion ghc-bootstrap-path
(copy-file (assoc-ref inputs "ghc-binary")
"ghc-bin.tar.xz")
(invoke "tar" "xvf" "ghc-bin.tar.xz")))
(alist-cons-before
'install-bin 'configure-bin
(with-directory-excursion
(string-append ghc-bootstrap-path "/ghc-7.8.4")
(invoke "make" "install"))))
(add-before 'install-bin 'configure-bin
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((binaries
(list
@ -524,7 +527,7 @@ libraries are included in this package.")
(gmp-include (string-append gmp "/include"))
(ncurses-lib
(dirname (search-input-file inputs "/lib/libncurses.so")))
(ld-so (search-input-file inputs ,(glibc-dynamic-linker)))
(ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
(libtinfo-dir
(string-append ghc-bootstrap-prefix
"/lib/ghc-7.8.4/terminfo-0.4.0.0")))
@ -544,7 +547,7 @@ libraries are included in this package.")
(string-append ncurses-lib "/libncursesw.so."
;; Extract "6.0" from "6.0-20170930" if a
;; dash-separated version tag exists.
,(let* ((v (package-version ncurses))
#$(let* ((v (package-version ncurses))
(d (or (string-index v #\-)
(string-length v))))
(version-major+minor (string-take v d))))
@ -557,14 +560,7 @@ libraries are included in this package.")
(string-append (getcwd) "/configure")
(string-append "--prefix=" ghc-bootstrap-prefix)
(string-append "--with-gmp-libraries=" gmp-lib)
(string-append "--with-gmp-includes=" gmp-include)))))
(alist-cons-before
'configure 'install-bin
(lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion
(string-append ghc-bootstrap-path "/ghc-7.8.4")
(invoke "make" "install")))
%standard-phases)))))))
(string-append "--with-gmp-includes=" gmp-include))))))))))
(native-search-paths (list (search-path-specification
(variable "GHC_PACKAGE_PATH")
(files (list