gnu: ghc-haddock-library: Update to 1.5.0.1.

* gnu/packages/patches/ghc-haddock-library-unbundle.patch: New file.
* gnu/packages/haskell.scm (ghc-haddock-library): Update to 1.5.0.1.
[source]: Add the patch; add a snippet to remove the bundled library.
[arguments]: Add a phase to relax test suite dependency constraints and
another to add a missing directory required for tests.
[native-inputs]: Add ghc-base-compat, ghc-optparse-applicative, and
ghc-tree-diff.
This commit is contained in:
Timothy Sample 2018-08-29 00:06:20 -04:00 committed by Ricardo Wurmus
parent 3b72e7e2d4
commit 082d9383d1
No known key found for this signature in database
GPG key ID: 197A5888235FACAC
2 changed files with 115 additions and 6 deletions

View file

@ -935,7 +935,7 @@ compute the difference between arbitrary abstract datatypes (ADTs) using
(define-public ghc-haddock-library
(package
(name "ghc-haddock-library")
(version "1.4.3")
(version "1.5.0.1")
(source
(origin
(method url-fetch)
@ -945,14 +945,37 @@ compute the difference between arbitrary abstract datatypes (ADTs) using
".tar.gz"))
(sha256
(base32
"0ns4bpf6whmcfl0cm2gx2c73if416x4q3ac4l4qm8w84h0zpcr7p"))))
"1cmbg8l5xrwpliclwy3l057raypjqy0hsg1h1743ahaj8gq10b7z"))
(patches (search-patches
"ghc-haddock-library-unbundle.patch"))
(modules '((guix build utils)))
(snippet '(begin
(delete-file-recursively "vendor")
#t))))
(build-system haskell-build-system)
(inputs
`(("ghc-base-compat" ,ghc-base-compat)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'configure 'relax-test-suite-dependencies
(lambda _
(substitute* "haddock-library.cabal"
(("base-compat\\s*\\^>= 0\\.9\\.3") "base-compat")
(("hspec\\s*\\^>= 2\\.4\\.4") "hspec"))))
;; The release tarball does not contain the "fixtures/examples"
;; directory, which is required for testing. In the upstream
;; repository, the directory exists and is populated. Here, we
;; create an empty directory to placate the tests.
(add-before 'check 'add-examples-directory
(lambda _
(mkdir "fixtures/examples")
#t)))))
(native-inputs
`(("hspec-discover" ,hspec-discover)
`(("ghc-base-compat" ,ghc-base-compat)
("ghc-hspec" ,ghc-hspec)
("ghc-quickcheck" ,ghc-quickcheck)))
("ghc-optparse-applicative" ,ghc-optparse-applicative)
("ghc-quickcheck" ,ghc-quickcheck)
("ghc-tree-diff" ,ghc-tree-diff)
("hspec-discover" ,hspec-discover)))
(home-page "https://www.haskell.org/haddock/")
(synopsis "Library exposing some functionality of Haddock")
(description