gnu: dhall: Disable network tests differently.
[jackhill/guix/guix.git] / gnu / packages / dhall.scm
1 ;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
2 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages dhall)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages haskell-xyz)
22 #:use-module (gnu packages haskell-check)
23 #:use-module (gnu packages haskell-crypto)
24 #:use-module (gnu packages haskell-web)
25 #:use-module (guix download)
26 #:use-module (guix build-system haskell)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages))
29
30 (define-public dhall
31 (package
32 (name "dhall")
33 (version "1.31.1")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append
38 "https://hackage.haskell.org/package/dhall/dhall-"
39 version
40 ".tar.gz"))
41 (sha256
42 (base32
43 "18v7vvcbcm9s7slh6h43rj9yakkkxwnwgj6kv84i6qzd2j7d80mc"))))
44 (build-system haskell-build-system)
45 (inputs
46 `(("ghc-aeson" ,ghc-aeson)
47 ("ghc-aeson-pretty" ,ghc-aeson-pretty)
48 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
49 ("ghc-atomic-write" ,ghc-atomic-write-0.2.0.7)
50 ("ghc-case-insensitive" ,ghc-case-insensitive)
51 ("ghc-cborg" ,ghc-cborg)
52 ("ghc-cborg-json" ,ghc-cborg-json)
53 ("ghc-contravariant" ,ghc-contravariant)
54 ("ghc-data-fix" ,ghc-data-fix)
55 ("ghc-diff" ,ghc-diff)
56 ("ghc-dotgen" ,ghc-dotgen)
57 ("ghc-either" ,ghc-either)
58 ("ghc-exceptions" ,ghc-exceptions)
59 ("ghc-hashable" ,ghc-hashable)
60 ("ghc-lens-family-core" ,ghc-lens-family-core)
61 ("ghc-megaparsec" ,ghc-megaparsec)
62 ("ghc-memory" ,ghc-memory)
63 ("ghc-network-uri" ,ghc-network-uri)
64 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
65 ("ghc-parsers" ,ghc-parsers)
66 ("ghc-parser-combinators" ,ghc-parser-combinators)
67 ("ghc-prettyprinter" ,ghc-prettyprinter-1.6)
68 ("ghc-prettyprinter-ansi-terminal" ,ghc-prettyprinter-ansi-terminal)
69 ("ghc-pretty-simple" ,ghc-pretty-simple)
70 ("ghc-profunctors" ,ghc-profunctors)
71 ("ghc-repline" ,ghc-repline-0.3)
72 ("ghc-serialise" ,ghc-serialise)
73 ("ghc-scientific" ,ghc-scientific)
74 ("ghc-text-manipulate" ,ghc-text-manipulate)
75 ("ghc-th-lift-instances" ,ghc-th-lift-instances)
76 ("ghc-transformers-compat" ,ghc-transformers-compat)
77 ("ghc-unordered-containers" ,ghc-unordered-containers)
78 ("ghc-uri-encode" ,ghc-uri-encode)
79 ("ghc-vector" ,ghc-vector)
80 ("ghc-cryptonite" ,ghc-cryptonite)
81 ("ghc-http-types" ,ghc-http-types)
82 ("ghc-http-client" ,ghc-http-client)
83 ("ghc-http-client-tls" ,ghc-http-client-tls)))
84 (native-inputs
85 `(("ghc-foldl" ,ghc-foldl)
86 ("ghc-generic-random" ,ghc-generic-random-1.3.0.1)
87 ("ghc-quickcheck" ,ghc-quickcheck)
88 ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
89 ("ghc-semigroups" ,ghc-semigroups)
90 ("ghc-special-values" ,ghc-special-values)
91 ("ghc-spoon" ,ghc-spoon)
92 ("ghc-tasty" ,ghc-tasty)
93 ("ghc-tasty-expected-failure" ,ghc-tasty-expected-failure)
94 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
95 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
96 ("ghc-turtle" ,ghc-turtle)
97 ("ghc-mockery" ,ghc-mockery)
98 ("ghc-doctest" ,ghc-doctest)))
99 (arguments
100 `(#:phases
101 (modify-phases %standard-phases
102 (add-after 'unpack 'remove-network-tests
103 (lambda _
104 (with-directory-excursion "dhall-lang/tests"
105 (for-each
106 delete-file
107 '("import/failure/referentiallyInsane.dhall"
108 "import/success/customHeadersA.dhall"
109 "import/success/noHeaderForwardingA.dhall"
110 "import/success/unit/RemoteAsTextA.dhall"
111 "import/success/unit/SimpleRemoteA.dhall"
112 "import/success/unit/asLocation/RemoteChain1A.dhall"
113 "import/success/unit/asLocation/RemoteChain2A.dhall"
114 "import/success/unit/asLocation/RemoteChain3A.dhall"
115 "import/success/unit/asLocation/RemoteChainEnvA.dhall"
116 "import/success/unit/asLocation/RemoteChainMissingA.dhall"
117 "type-inference/success/CacheImportsA.dhall"
118 "type-inference/success/CacheImportsCanonicalizeA.dhall")))
119 (substitute* "src/Dhall/Tutorial.hs"
120 (((string-append
121 "-- >>> input auto "
122 "\"https://raw.githubusercontent.com/dhall-lang"
123 "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
124 "examples/True\" :: IO Bool"))
125 "")
126 (((string-append
127 "-- >>> input auto "
128 "\"False == "
129 "https://raw.githubusercontent.com/dhall-lang"
130 "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
131 "examples/True\" :: IO Bool"))
132 ""))
133 #t)))))
134 (home-page
135 "https://dhall-lang.org/")
136 (synopsis
137 "Configuration language guaranteed to terminate")
138 (description
139 "Dhall is an explicitly typed configuration language that is not Turing
140 complete. Despite being Turing incomplete, Dhall is a real programming
141 language with a type-checker and evaluator.
142
143 Use this library to parse, type-check, evaluate, and pretty-print the Dhall
144 configuration language. This package also includes an executable which
145 type-checks a Dhall file and reduces the file to a fully evaluated normal
146 form.")
147 (license license:bsd-3)))