diff mbox

[7/9] gnu: idris: Update to 0.12.3.

Message ID 20161203104213.8135-7-david@craven.ch
State New
Headers show

Commit Message

David Craven Dec. 3, 2016, 10:42 a.m. UTC
* gnu/packages/haskell.scm (idris): Update to 0.12.3.
  [origin]: Remove snippet.
  [inputs]: Add ghc-aeson, ghc-async, ghc-fsnotify, ghc-regex-tdfa,
  ghc-tasty-golden, ghc-tasty-rerun and ghc-terminal-size.
  [arguments]: Disable tests.
---
 gnu/packages/haskell.scm | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

Comments

Leo Famulari Dec. 3, 2016, 8:03 p.m. UTC | #1
On Sat, Dec 03, 2016 at 11:42:11AM +0100, David Craven wrote:
> * gnu/packages/haskell.scm (idris): Update to 0.12.3.
>   [origin]: Remove snippet.
>   [inputs]: Add ghc-aeson, ghc-async, ghc-fsnotify, ghc-regex-tdfa,
>   ghc-tasty-golden, ghc-tasty-rerun and ghc-terminal-size.
>   [arguments]: Disable tests.

Why do we need to skip the tests?

LGTM with that question answered.
David Craven Dec. 3, 2016, 8:26 p.m. UTC | #2
> Why do we need to skip the tests?

First idris is not found, then after adding dist/build/idris to PATH,
the idris libraries aren't found. So I set IDRIS_LIBRARY_PATH to libs.
Then the idris runtime system isn't found, so I added rts to
C_INCLUDE_PATH and LIBRARY_PATH. Half of the tests still fail with
blah not found. I think that runhaskell Setup.hs test doesn't set the
working directory correctly. I spent some time trying to track down
the issue further, but couldn't figure out how to build a Haskell
project locally:

guix environment idris
ghc-pkg --package-db=package.conf.d recache
GHC_PACKAGE_PATH= runhaskell Setup.hs configure --package-db=package.conf.d

That's the point when I gave up. If someone knows how I can build a
Haskell project without too much hassle. IDRIS_LIBRARY_PATH currently
only takes one path. To package idris libraries it would be nice to
extend IDRIS_LIBRARY_PATH to a colon separated list, but without a
simple way to build the project (incrementally) it looks like too much
of a hassle...
Leo Famulari Dec. 3, 2016, 9:06 p.m. UTC | #3
On Sat, Dec 03, 2016 at 09:26:02PM +0100, David Craven wrote:
> > Why do we need to skip the tests?
> 
> First idris is not found, then after adding dist/build/idris to PATH,
> the idris libraries aren't found. So I set IDRIS_LIBRARY_PATH to libs.
> Then the idris runtime system isn't found, so I added rts to
> C_INCLUDE_PATH and LIBRARY_PATH. Half of the tests still fail with
> blah not found. I think that runhaskell Setup.hs test doesn't set the
> working directory correctly. I spent some time trying to track down
> the issue further, but couldn't figure out how to build a Haskell
> project locally:
> 
> guix environment idris
> ghc-pkg --package-db=package.conf.d recache
> GHC_PACKAGE_PATH= runhaskell Setup.hs configure --package-db=package.conf.d
> 
> That's the point when I gave up. If someone knows how I can build a
> Haskell project without too much hassle. IDRIS_LIBRARY_PATH currently
> only takes one path. To package idris libraries it would be nice to
> extend IDRIS_LIBRARY_PATH to a colon separated list, but without a
> simple way to build the project (incrementally) it looks like too much
> of a hassle...

Okay, I think you should summarize this in a code comment :)
diff mbox

Patch

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 0efb407..2e0ed18 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6672,32 +6672,28 @@  constant-time:
 (define-public idris
   (package
     (name "idris")
-    (version "0.9.19.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/idris-"
-                           version "/idris-" version ".tar.gz"))
-       (sha256
-        (base32
-         "10641svdsjlxbxmbvylpia04cz5nn9486lpiay8ibqcrc1792qgc"))
-       (modules '((guix build utils)))
-       (snippet
-        '(substitute* "idris.cabal"
-           ;; Package description file has a too-tight version restriction,
-           ;; rendering it incompatible with GHC 7.10.2.  This is fixed
-           ;; upstream.  See
-           ;; <https://github.com/idris-lang/Idris-dev/issues/2734>.
-           (("vector < 0.11") "vector < 0.12")))))
+    (version "0.12.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/"
+                    "idris-" version "/idris-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1ijrbgzaahw9aagn4al55nqcggrg9ajlrkq2fjc1saq3xdd3v7rs"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'configure 'patch-cc-command
-                              (lambda _
-                                (setenv "CC" "gcc"))))))
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-cc-command
+           (lambda _
+             (setenv "CC" "gcc"))))))
     (inputs
      `(("gmp" ,gmp)
        ("ncurses" ,ncurses)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-async" ,ghc-async)
        ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint)
        ("ghc-ansi-terminal" ,ghc-ansi-terminal)
        ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
@@ -6706,12 +6702,19 @@  constant-time:
        ("ghc-blaze-markup" ,ghc-blaze-markup)
        ("ghc-cheapskate" ,ghc-cheapskate)
        ("ghc-fingertree" ,ghc-fingertree)
+       ("ghc-fsnotify" ,ghc-fsnotify)
+       ("ghc-ieee754" ,ghc-ieee754)
        ("ghc-mtl" ,ghc-mtl)
        ("ghc-network" ,ghc-network)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-parsers" ,ghc-parsers)
+       ("ghc-regex-tdfa" ,ghc-regex-tdfa)
        ("ghc-safe" ,ghc-safe)
        ("ghc-split" ,ghc-split)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-golden" ,ghc-tasty-golden)
+       ("ghc-tasty-rerun" ,ghc-tasty-rerun)
+       ("ghc-terminal-size" ,ghc-terminal-size)
        ("ghc-text" ,ghc-text)
        ("ghc-trifecta" ,ghc-trifecta)
        ("ghc-uniplate" ,ghc-uniplate)