gnu: ghc-esqueleto: Update to commit b81e0d9.

* gnu/packages/haskell.scm (ghc-esqueleto): Update to commit b81e0d9.
[source]: Use git-fetch.
[arguments]: Disable Haddock and add phase to remove MySQL and PostgreSQL
test-suites.
[inputs]: Add ghc-unliftio.
[native-inputs]: Remove ghc-hunit, ghc-monad-control, and ghc-quickcheck.
This commit is contained in:
Timothy Sample 2018-08-23 23:09:32 -04:00 committed by Ricardo Wurmus
parent 99daa29488
commit 3b72e7e2d4
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -8555,42 +8555,69 @@ (define-public ghc-json
(license license:bsd-3))) (license license:bsd-3)))
(define-public ghc-esqueleto (define-public ghc-esqueleto
(package (let ((version "2.5.3")
(name "ghc-esqueleto") (revision "1")
(version "2.5.3") (commit "b81e0d951e510ebffca03c5a58658ad884cc6fbd"))
(source (package
(origin (name "ghc-esqueleto")
(method url-fetch) (version (git-version version revision commit))
(uri (string-append "https://hackage.haskell.org/package/" (source
"esqueleto/esqueleto-" version ".tar.gz")) (origin
(sha256 (method git-fetch)
(base32 (uri (git-reference
"10n49rzqmblky7pwjnysalyy6nacmxfms8dqbsdv6hlyzr8pb69x")))) (url "https://github.com/bitemyapp/esqueleto")
(build-system haskell-build-system) (commit commit)))
(inputs (sha256
`(("ghc-blaze-html" ,ghc-blaze-html) (base32
("ghc-conduit" ,ghc-conduit) "0lz1qxms7cfg5p3j37inlych0r2fwhm8xbarcys3df9m7jy9nixa"))))
("ghc-monad-logger" ,ghc-monad-logger) (build-system haskell-build-system)
("ghc-persistent" ,ghc-persistent) (arguments
("ghc-resourcet" ,ghc-resourcet) `(#:haddock? #f ; Haddock reports an internal error.
("ghc-tagged" ,ghc-tagged) #:phases
("ghc-text" ,ghc-text) (modify-phases %standard-phases
("ghc-unordered-containers" ,ghc-unordered-containers))) ;; This package normally runs tests for the MySQL, PostgreSQL, and
(native-inputs ;; SQLite backends. Since we only have Haskell packages for
`(("ghc-hspec" ,ghc-hspec) ;; SQLite, we remove the other two test suites. FIXME: Add the
("ghc-hunit" ,ghc-hunit) ;; other backends and run all three test suites.
("ghc-monad-control" ,ghc-monad-control) (add-before 'configure 'remove-non-sqlite-test-suites
("ghc-persistent-sqlite" ,ghc-persistent-sqlite) (lambda _
("ghc-persistent-template" ,ghc-persistent-template) (use-modules (ice-9 rdelim))
("ghc-quickcheck" ,ghc-quickcheck))) (with-atomic-file-replacement "esqueleto.cabal"
(home-page "https://github.com/bitemyapp/esqueleto") (lambda (in out)
(synopsis "Type-safe embedded domain specific language for SQL queries") (let loop ((line (read-line in 'concat)) (deleting? #f))
(description "This library provides a type-safe embedded domain specific (cond
((eof-object? line) #t)
((string-every char-set:whitespace line)
(unless deleting? (display line out))
(loop (read-line in 'concat) #f))
((member line '("test-suite mysql\n"
"test-suite postgresql\n"))
(loop (read-line in 'concat) #t))
(else
(unless deleting? (display line out))
(loop (read-line in 'concat) deleting?)))))))))))
(inputs
`(("ghc-blaze-html" ,ghc-blaze-html)
("ghc-conduit" ,ghc-conduit)
("ghc-monad-logger" ,ghc-monad-logger)
("ghc-persistent" ,ghc-persistent)
("ghc-resourcet" ,ghc-resourcet)
("ghc-tagged" ,ghc-tagged)
("ghc-text" ,ghc-text)
("ghc-unliftio" ,ghc-unliftio)
("ghc-unordered-containers" ,ghc-unordered-containers)))
(native-inputs
`(("ghc-hspec" ,ghc-hspec)
("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
("ghc-persistent-template" ,ghc-persistent-template)))
(home-page "https://github.com/bitemyapp/esqueleto")
(synopsis "Type-safe embedded domain specific language for SQL queries")
(description "This library provides a type-safe embedded domain specific
language (EDSL) for SQL queries that works with SQL backends as provided by language (EDSL) for SQL queries that works with SQL backends as provided by
@code{ghc-persistent}. Its language closely resembles SQL, so you don't have @code{ghc-persistent}. Its language closely resembles SQL, so you don't have
to learn new concepts, just new syntax, and it's fairly easy to predict the to learn new concepts, just new syntax, and it's fairly easy to predict the
generated SQL and optimize it for your backend.") generated SQL and optimize it for your backend.")
(license license:bsd-3))) (license license:bsd-3))))
(define-public shellcheck (define-public shellcheck
(package (package