[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: gnu: ghc-8.0: Modernize package.
From: |
guix-commits |
Subject: |
04/10: gnu: ghc-8.0: Modernize package. |
Date: |
Tue, 23 Aug 2022 11:05:40 -0400 (EDT) |
efraim pushed a commit to branch staging
in repository guix.
commit 63e01d01b114d64eddaf68beb1a815696f205778
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Aug 21 15:29:41 2022 +0300
gnu: ghc-8.0: Modernize package.
* gnu/packages/haskell.scm (ghc-8.0)[arguments]: Rewrite using g-exps.
Unpack testsuite tarball from the store. Remove trailing #t from phases.
[inputs]: Remove input labels. Move ghc-testsuite ...
[native-inputs]: ... to here.
---
gnu/packages/haskell.scm | 96 +++++++++++++++++++++++-------------------------
1 file changed, 45 insertions(+), 51 deletions(-)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 15a96f3dd7..3465bfbdb6 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -587,25 +587,24 @@ interactive environment for the functional language
Haskell.")
(supported-systems '("i686-linux" "x86_64-linux"))
(outputs '("out" "doc"))
(inputs
- `(("gmp" ,gmp)
- ("ncurses" ,ncurses)
- ("libffi" ,libffi)
- ("ghc-testsuite"
- ,(origin
- (method url-fetch)
- (uri (string-append
- "https://www.haskell.org/ghc/dist/"
- version "/" name "-" version "-testsuite.tar.xz"))
- (sha256
- (base32
"1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj"))))))
+ (list gmp ncurses libffi))
(native-inputs
`(("perl" ,perl)
("python" ,python-2) ; for tests
("ghostscript" ,ghostscript) ; for tests
;; GHC is built with GHC.
- ("ghc-bootstrap" ,ghc-7)))
+ ("ghc-bootstrap" ,ghc-7)
+ ("ghc-testsuite"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.haskell.org/ghc/dist/"
+ version "/" name "-" version "-testsuite.tar.xz"))
+ (sha256
+ (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj"))))
))
(arguments
- `(#:test-target "test"
+ (list
+ #:test-target "test"
;; We get a smaller number of test failures by disabling parallel test
;; execution.
#:parallel-tests? #f
@@ -616,53 +615,48 @@ interactive environment for the functional language
Haskell.")
#:build #f
#:configure-flags
- (list
- (string-append "--with-gmp-libraries="
- (assoc-ref %build-inputs "gmp") "/lib")
- (string-append "--with-gmp-includes="
- (assoc-ref %build-inputs "gmp") "/include")
- "--with-system-libffi"
- (string-append "--with-ffi-libraries="
- (assoc-ref %build-inputs "libffi") "/lib")
- (string-append "--with-ffi-includes="
- (assoc-ref %build-inputs "libffi") "/include")
- (string-append "--with-curses-libraries="
- (assoc-ref %build-inputs "ncurses") "/lib")
- (string-append "--with-curses-includes="
- (assoc-ref %build-inputs "ncurses") "/include"))
+ #~(list
+ (string-append "--with-gmp-libraries="
+ (assoc-ref %build-inputs "gmp") "/lib")
+ (string-append "--with-gmp-includes="
+ (assoc-ref %build-inputs "gmp") "/include")
+ "--with-system-libffi"
+ (string-append "--with-ffi-libraries="
+ (assoc-ref %build-inputs "libffi") "/lib")
+ (string-append "--with-ffi-includes="
+ (assoc-ref %build-inputs "libffi") "/include")
+ (string-append "--with-curses-libraries="
+ (assoc-ref %build-inputs "ncurses") "/lib")
+ (string-append "--with-curses-includes="
+ (assoc-ref %build-inputs "ncurses") "/include"))
#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-testsuite
- (lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion ".."
- (copy-file (assoc-ref inputs "ghc-testsuite")
- "ghc-testsuite.tar.xz")
- (zero? (system* "tar" "xvf" "ghc-testsuite.tar.xz")))))
- (add-before 'build 'fix-lib-paths
- (lambda _
- (substitute*
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'unpack-testsuite
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion ".."
+ (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite")))))
+ (add-before 'build 'fix-lib-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute*
(list "libraries/process/System/Process/Posix.hs"
"libraries/process/tests/process001.hs"
"libraries/process/tests/process002.hs"
"libraries/unix/cbits/execvpe.c")
- (("/bin/sh") (which "sh"))
- (("/bin/ls") (which "ls")))
- #t))
- (add-before 'build 'fix-environment
- (lambda _
- (unsetenv "GHC_PACKAGE_PATH")
- (setenv "CONFIG_SHELL" (which "bash"))
- #t))
- (add-before 'check 'fix-testsuite
- (lambda _
- (substitute*
+ (("/bin/sh") (search-input-file inputs "/bin/sh"))
+ (("/bin/ls") (search-input-file inputs "/bin/ls")))))
+ (add-before 'build 'fix-environment
+ (lambda _
+ (unsetenv "GHC_PACKAGE_PATH")
+ (setenv "CONFIG_SHELL" (which "bash"))))
+ (add-before 'check 'fix-testsuite
+ (lambda _
+ (substitute*
(list "testsuite/timeout/Makefile"
"testsuite/timeout/timeout.py"
"testsuite/timeout/timeout.hs"
"testsuite/tests/programs/life_space_leak/life.test")
- (("/bin/sh") (which "sh"))
- (("/bin/rm") "rm"))
- #t)))))
+ (("/bin/sh") (which "sh"))
+ (("/bin/rm") "rm")))))))
(native-search-paths (list (search-path-specification
(variable "GHC_PACKAGE_PATH")
(files (list
- branch staging updated (213c60f332 -> 47316120b7), guix-commits, 2022/08/23
- 08/10: gnu: ghc-8.10: Add phase unconditionally., guix-commits, 2022/08/23
- 10/10: gnu: ghc-8.10: Build using ghc-8.6., guix-commits, 2022/08/23
- 06/10: gnu: ghc-8.6: Rewrite using G-exps., guix-commits, 2022/08/23
- 02/10: gnu: ghc-7: Unpack tarballs from the store., guix-commits, 2022/08/23
- 03/10: gnu: ghc-7: Update to 7.10.3., guix-commits, 2022/08/23
- 01/10: gnu: ghc-7: Rewrite arguments using G-expressions., guix-commits, 2022/08/23
- 09/10: gnu: ghc-8.10: Rewrite using G-exps., guix-commits, 2022/08/23
- 05/10: gnu: ghc-8.4: Modernize package., guix-commits, 2022/08/23
- 04/10: gnu: ghc-8.0: Modernize package.,
guix-commits <=
- 07/10: gnu: ghc-8.8: Rewrite using G-exps., guix-commits, 2022/08/23