summaryrefslogtreecommitdiff
path: root/gnu/packages/agda.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
commitcf6db76d2af2f287f12928df160447ab4165b3e5 (patch)
tree49a1309c0e04c00090ab106f7ae3495a6da328c1 /gnu/packages/agda.scm
parente65b2181e8b436278e3dd0b405602a400fbd0a75 (diff)
parenta6798218bea0d6b2df598042d1ced29f74bb4250 (diff)
downloadpatches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar
patches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/agda.scm')
-rw-r--r--gnu/packages/agda.scm51
1 files changed, 46 insertions, 5 deletions
diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index df4968c445..6bb38aac4d 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,7 +31,7 @@
(define-public agda
(package
(name "agda")
- (version "2.5.3")
+ (version "2.5.4.1")
(source
(origin
(method url-fetch)
@@ -39,7 +40,7 @@
version ".tar.gz"))
(sha256
(base32
- "0r80vw7vnvbgq47y50v050malv7zvv2p2kg6f47i04r0b2ix855a"))))
+ "0bxpibsk98n9xp42d92ma5vj2fam8rsnl61fbhr3askfjdvalnbp"))))
(build-system haskell-build-system)
(inputs
`(("cpphs" ,cpphs)
@@ -51,14 +52,13 @@
("ghc-edisoncore" ,ghc-edisoncore)
("ghc-edit-distance" ,ghc-edit-distance)
("ghc-equivalence" ,ghc-equivalence)
+ ("ghc-filemanip" ,ghc-filemanip)
("ghc-geniplate-mirror" ,ghc-geniplate-mirror)
("ghc-gitrev" ,ghc-gitrev)
("ghc-happy" ,ghc-happy)
("ghc-hashable" ,ghc-hashable)
("ghc-hashtables" ,ghc-hashtables)
("ghc-ieee754" ,ghc-ieee754)
- ("ghc-monadplus" ,ghc-monadplus)
- ("ghc-mtl" ,ghc-mtl)
("ghc-murmur-hash" ,ghc-murmur-hash)
("ghc-uri-encode" ,ghc-uri-encode)
("ghc-parallel" ,ghc-parallel)
@@ -71,9 +71,50 @@
(arguments
`(#:modules ((guix build haskell-build-system)
(guix build utils)
- (srfi srfi-26))
+ (srfi srfi-26)
+ (ice-9 match))
#:phases
(modify-phases %standard-phases
+ ;; FIXME: This is a copy of the standard configure phase with a tiny
+ ;; difference: this package needs the -package-db flag to be passed
+ ;; to "runhaskell" in addition to the "configure" action, because
+ ;; Setup.hs depends on filemanip. Without this option the Setup.hs
+ ;; file cannot be evaluated. The haskell-build-system should be
+ ;; changed to pass "-package-db" to "runhaskell" in any case.
+ (replace 'configure
+ (lambda* (#:key outputs inputs tests? (configure-flags '())
+ #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (input-dirs (match inputs
+ (((_ . dir) ...)
+ dir)
+ (_ '())))
+ (ghc-path (getenv "GHC_PACKAGE_PATH"))
+ (params (append `(,(string-append "--prefix=" out))
+ `(,(string-append "--libdir=" out "/lib"))
+ `(,(string-append "--bindir=" out "/bin"))
+ `(,(string-append
+ "--docdir=" out
+ "/share/doc/" ((@@ (guix build haskell-build-system)
+ package-name-version) out)))
+ '("--libsubdir=$compiler/$pkg-$version")
+ '("--package-db=../package.conf.d")
+ '("--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)))
+ (unsetenv "GHC_PACKAGE_PATH")
+ (apply invoke "runhaskell" "-package-db=../package.conf.d"
+ "Setup.hs" "configure" params)
+ (setenv "GHC_PACKAGE_PATH" ghc-path)
+ #t)))
(add-after 'compile 'agda-compile
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))