dhall.scm 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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.32.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 "1imj0bh5365pdizvjbw2wqz0g9hakigf1zm4fr6379qdchxpp90p"))))
  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-network-uri" ,ghc-network-uri)
  60. ("ghc-optparse-applicative" ,ghc-optparse-applicative)
  61. ("ghc-parsers" ,ghc-parsers)
  62. ("ghc-parser-combinators" ,ghc-parser-combinators)
  63. ("ghc-prettyprinter" ,ghc-prettyprinter-1.6)
  64. ("ghc-prettyprinter-ansi-terminal" ,ghc-prettyprinter-ansi-terminal)
  65. ("ghc-pretty-simple" ,ghc-pretty-simple)
  66. ("ghc-profunctors" ,ghc-profunctors)
  67. ("ghc-repline" ,ghc-repline-0.3)
  68. ("ghc-serialise" ,ghc-serialise)
  69. ("ghc-scientific" ,ghc-scientific)
  70. ("ghc-text-manipulate" ,ghc-text-manipulate)
  71. ("ghc-th-lift-instances" ,ghc-th-lift-instances)
  72. ("ghc-transformers-compat" ,ghc-transformers-compat)
  73. ("ghc-unordered-containers" ,ghc-unordered-containers)
  74. ("ghc-uri-encode" ,ghc-uri-encode)
  75. ("ghc-vector" ,ghc-vector)
  76. ("ghc-cryptonite" ,ghc-cryptonite)
  77. ("ghc-http-types" ,ghc-http-types)
  78. ("ghc-http-client" ,ghc-http-client)
  79. ("ghc-http-client-tls" ,ghc-http-client-tls)))
  80. (native-inputs
  81. `(("ghc-foldl" ,ghc-foldl)
  82. ("ghc-generic-random" ,ghc-generic-random-1.3.0.1)
  83. ("ghc-quickcheck" ,ghc-quickcheck)
  84. ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
  85. ("ghc-semigroups" ,ghc-semigroups)
  86. ("ghc-special-values" ,ghc-special-values)
  87. ("ghc-spoon" ,ghc-spoon)
  88. ("ghc-tasty" ,ghc-tasty)
  89. ("ghc-tasty-expected-failure" ,ghc-tasty-expected-failure)
  90. ("ghc-tasty-hunit" ,ghc-tasty-hunit)
  91. ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
  92. ("ghc-turtle" ,ghc-turtle)
  93. ("ghc-mockery" ,ghc-mockery)
  94. ("ghc-doctest" ,ghc-doctest)))
  95. (arguments
  96. `(#:phases
  97. (modify-phases %standard-phases
  98. (add-after 'unpack 'remove-network-tests
  99. (lambda _
  100. (with-directory-excursion "dhall-lang/tests"
  101. (for-each
  102. delete-file
  103. '("import/failure/referentiallyInsane.dhall"
  104. "import/success/customHeadersA.dhall"
  105. "import/success/noHeaderForwardingA.dhall"
  106. "import/success/unit/RemoteAsTextA.dhall"
  107. "import/success/unit/SimpleRemoteA.dhall"
  108. "import/success/unit/asLocation/RemoteChain1A.dhall"
  109. "import/success/unit/asLocation/RemoteChain2A.dhall"
  110. "import/success/unit/asLocation/RemoteChain3A.dhall"
  111. "import/success/unit/asLocation/RemoteChainEnvA.dhall"
  112. "import/success/unit/asLocation/RemoteChainMissingA.dhall"
  113. "type-inference/success/CacheImportsA.dhall"
  114. "type-inference/success/CacheImportsCanonicalizeA.dhall")))
  115. (substitute* "src/Dhall/Tutorial.hs"
  116. (((string-append
  117. "-- >>> input auto "
  118. "\"https://raw.githubusercontent.com/dhall-lang"
  119. "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
  120. "examples/True\" :: IO Bool"))
  121. "")
  122. (((string-append
  123. "-- >>> input auto "
  124. "\"False == "
  125. "https://raw.githubusercontent.com/dhall-lang"
  126. "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
  127. "examples/True\" :: IO Bool"))
  128. ""))
  129. #t)))))
  130. (home-page "https://dhall-lang.org/")
  131. (synopsis "Configuration language guaranteed to terminate")
  132. (description
  133. "Dhall is an explicitly typed configuration language that is not Turing
  134. complete. Despite being Turing incomplete, Dhall is a real programming
  135. language with a type-checker and evaluator.
  136. Use this library to parse, type-check, evaluate, and pretty-print the Dhall
  137. configuration language. This package also includes an executable which
  138. type-checks a Dhall file and reduces the file to a fully evaluated normal
  139. form.")
  140. (license license:bsd-3)))