dhall.scm 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. (define-module (gnu packages dhall)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages haskell-xyz)
  21. #:use-module (gnu packages haskell-check)
  22. #:use-module (gnu packages haskell-crypto)
  23. #:use-module (gnu packages haskell-web)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system haskell)
  26. #:use-module ((guix licenses) #:prefix license:)
  27. #:use-module (guix packages))
  28. (define-public dhall
  29. (package
  30. (name "dhall")
  31. (version "1.39.0")
  32. (source
  33. (origin
  34. (method url-fetch)
  35. (uri (string-append "https://hackage.haskell.org/package/dhall/dhall-"
  36. version ".tar.gz"))
  37. (sha256
  38. (base32 "1by2d84fbckspczddl4npfsf89q6nprmbg0i5g8yr1psp0fpl4ab"))))
  39. (build-system haskell-build-system)
  40. (inputs
  41. `(("ghc-aeson" ,ghc-aeson)
  42. ("ghc-aeson-pretty" ,ghc-aeson-pretty)
  43. ("ghc-ansi-terminal" ,ghc-ansi-terminal)
  44. ("ghc-atomic-write" ,ghc-atomic-write-0.2.0.7)
  45. ("ghc-case-insensitive" ,ghc-case-insensitive)
  46. ("ghc-cborg" ,ghc-cborg)
  47. ("ghc-cborg-json" ,ghc-cborg-json)
  48. ("ghc-contravariant" ,ghc-contravariant)
  49. ("ghc-data-fix" ,ghc-data-fix)
  50. ("ghc-diff" ,ghc-diff)
  51. ("ghc-dotgen" ,ghc-dotgen)
  52. ("ghc-either" ,ghc-either)
  53. ("ghc-exceptions" ,ghc-exceptions)
  54. ("ghc-half" ,ghc-half)
  55. ("ghc-hashable" ,ghc-hashable)
  56. ("ghc-lens-family-core" ,ghc-lens-family-core)
  57. ("ghc-megaparsec" ,ghc-megaparsec)
  58. ("ghc-memory" ,ghc-memory)
  59. ("ghc-mmorph" ,ghc-mmorph)
  60. ("ghc-network-uri" ,ghc-network-uri)
  61. ("ghc-optparse-applicative" ,ghc-optparse-applicative)
  62. ("ghc-parsers" ,ghc-parsers)
  63. ("ghc-parser-combinators" ,ghc-parser-combinators)
  64. ("ghc-prettyprinter" ,ghc-prettyprinter)
  65. ("ghc-prettyprinter-ansi-terminal" ,ghc-prettyprinter-ansi-terminal)
  66. ("ghc-pretty-simple" ,ghc-pretty-simple)
  67. ("ghc-profunctors" ,ghc-profunctors)
  68. ("ghc-pretty-simple" ,ghc-pretty-simple)
  69. ("ghc-repline" ,ghc-repline)
  70. ("ghc-serialise" ,ghc-serialise)
  71. ("ghc-scientific" ,ghc-scientific)
  72. ("ghc-text-manipulate" ,ghc-text-manipulate)
  73. ("ghc-th-lift-instances" ,ghc-th-lift-instances)
  74. ("ghc-transformers-compat" ,ghc-transformers-compat)
  75. ("ghc-unordered-containers" ,ghc-unordered-containers)
  76. ("ghc-uri-encode" ,ghc-uri-encode)
  77. ("ghc-vector" ,ghc-vector)
  78. ("ghc-cryptonite" ,ghc-cryptonite)
  79. ("ghc-http-types" ,ghc-http-types)
  80. ("ghc-http-client" ,ghc-http-client)
  81. ("ghc-http-client-tls" ,ghc-http-client-tls)))
  82. (native-inputs
  83. `(("ghc-foldl" ,ghc-foldl)
  84. ("ghc-generic-random" ,ghc-generic-random-1.3.0.1)
  85. ("ghc-quickcheck" ,ghc-quickcheck)
  86. ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
  87. ("ghc-semigroups" ,ghc-semigroups)
  88. ("ghc-special-values" ,ghc-special-values)
  89. ("ghc-spoon" ,ghc-spoon)
  90. ("ghc-tasty" ,ghc-tasty)
  91. ("ghc-tasty-expected-failure" ,ghc-tasty-expected-failure)
  92. ("ghc-tasty-hunit" ,ghc-tasty-hunit)
  93. ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
  94. ("ghc-tasty-silver" ,ghc-tasty-silver)
  95. ("ghc-turtle" ,ghc-turtle)
  96. ("ghc-mockery" ,ghc-mockery)
  97. ("ghc-doctest" ,ghc-doctest)))
  98. (arguments
  99. `(#:phases
  100. (modify-phases %standard-phases
  101. (add-after 'unpack 'remove-network-tests
  102. (lambda _
  103. (with-directory-excursion "dhall-lang/tests"
  104. (for-each
  105. delete-file
  106. '("import/success/customHeadersA.dhall"
  107. "import/success/noHeaderForwardingA.dhall"
  108. "import/success/unit/RemoteAsTextA.dhall"
  109. "import/success/unit/SimpleRemoteA.dhall"
  110. "import/success/unit/asLocation/RemoteChain1A.dhall"
  111. "import/success/unit/asLocation/RemoteChain2A.dhall"
  112. "import/success/unit/asLocation/RemoteChain3A.dhall"
  113. "import/success/unit/asLocation/RemoteChainEnvA.dhall"
  114. "import/success/unit/asLocation/RemoteChainMissingA.dhall"
  115. "type-inference/success/CacheImportsA.dhall"
  116. "type-inference/success/CacheImportsCanonicalizeA.dhall")))
  117. (substitute* "src/Dhall/Tutorial.hs"
  118. (((string-append
  119. "-- >>> input auto "
  120. "\"https://raw.githubusercontent.com/dhall-lang"
  121. "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
  122. "examples/True\" :: IO Bool"))
  123. "")
  124. (((string-append
  125. "-- >>> input auto "
  126. "\"False == "
  127. "https://raw.githubusercontent.com/dhall-lang"
  128. "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
  129. "examples/True\" :: IO Bool"))
  130. ""))
  131. #t)))))
  132. (home-page "https://dhall-lang.org/")
  133. (synopsis "Configuration language guaranteed to terminate")
  134. (description
  135. "Dhall is an explicitly typed configuration language that is not Turing
  136. complete. Despite being Turing incomplete, Dhall is a real programming
  137. language with a type-checker and evaluator.
  138. Use this library to parse, type-check, evaluate, and pretty-print the Dhall
  139. configuration language. This package also includes an executable which
  140. type-checks a Dhall file and reduces the file to a fully evaluated normal
  141. form.")
  142. (license license:bsd-3)))