mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: ghc-haddock-api: Update to 2.22.0.
* gnu/packages/patches/ghc-haddock-api-fix-haddock.patch: New file. * gnu/local.mk: Add it. * gnu/packages/haskell-xyz.scm (ghc-haddock-api): Update to 2.22.0. [source]: Use the new patch. [arguments]: Change the 'update-constraints' phase to allow newer versions of 'QuickCheck' and 'hspec'.
This commit is contained in:
parent
c1637311b6
commit
1b84d8ef34
3 changed files with 62 additions and 6 deletions
|
@ -879,6 +879,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
|
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
|
||||||
%D%/packages/patches/ghc-diff-swap-cover-args.patch \
|
%D%/packages/patches/ghc-diff-swap-cover-args.patch \
|
||||||
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \
|
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \
|
||||||
|
%D%/packages/patches/ghc-haddock-api-fix-haddock.patch \
|
||||||
%D%/packages/patches/ghc-hpack-fix-tests.patch \
|
%D%/packages/patches/ghc-hpack-fix-tests.patch \
|
||||||
%D%/packages/patches/ghc-microlens-aeson-fix-tests.patch \
|
%D%/packages/patches/ghc-microlens-aeson-fix-tests.patch \
|
||||||
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
|
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
|
||||||
|
|
|
@ -4740,7 +4740,7 @@ (define-public ghc-haddock
|
||||||
(define-public ghc-haddock-api
|
(define-public ghc-haddock-api
|
||||||
(package
|
(package
|
||||||
(name "ghc-haddock-api")
|
(name "ghc-haddock-api")
|
||||||
(version "2.19.0.1")
|
(version "2.22.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
|
@ -4748,9 +4748,10 @@ (define-public ghc-haddock-api
|
||||||
"https://hackage.haskell.org/package/haddock-api/haddock-api-"
|
"https://hackage.haskell.org/package/haddock-api/haddock-api-"
|
||||||
version
|
version
|
||||||
".tar.gz"))
|
".tar.gz"))
|
||||||
|
(patches (search-patches "ghc-haddock-api-fix-haddock.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0c6i7sljp7myz25d90gyw68a90i5jcrkajkxcciikp2hjirfaas3"))))
|
"149q4zlf4m7wcrr4af2n2flh0jxjsypshbc229vsj1m0kmz4z014"))))
|
||||||
(build-system haskell-build-system)
|
(build-system haskell-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
|
@ -4758,10 +4759,10 @@ (define-public ghc-haddock-api
|
||||||
(add-before 'configure 'update-constraints
|
(add-before 'configure 'update-constraints
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "haddock-api.cabal"
|
(substitute* "haddock-api.cabal"
|
||||||
(("Cabal \\^>= 2\\.0\\.0")
|
(("QuickCheck \\^>= 2\\.11")
|
||||||
"Cabal ^>= 2.2.0")
|
"QuickCheck ^>= 2.13")
|
||||||
(("hspec \\^>= 2\\.4\\.4")
|
(("hspec >= 2\\.4\\.4 && < 2\\.6")
|
||||||
"hspec >= 2.4.4 && < 2.6")))))))
|
"hspec >= 2.4.4 && < 2.8")))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("ghc-paths" ,ghc-paths)
|
`(("ghc-paths" ,ghc-paths)
|
||||||
("ghc-haddock-library" ,ghc-haddock-library)))
|
("ghc-haddock-library" ,ghc-haddock-library)))
|
||||||
|
|
54
gnu/packages/patches/ghc-haddock-api-fix-haddock.patch
Normal file
54
gnu/packages/patches/ghc-haddock-api-fix-haddock.patch
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
This patch is taken from upstream. It fixes documentation generation.
|
||||||
|
The patch has been lightly adapted to apply to the release tarball, but
|
||||||
|
the commit message was left untouched, so it refers to some changes not
|
||||||
|
included in the patch.
|
||||||
|
|
||||||
|
From 0d9a81e20238a6b72f9f5c005f1f7e9cf05f6fb9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Theriault <alec.theriault@gmail.com>
|
||||||
|
Date: Sat, 27 Oct 2018 10:05:04 -0700
|
||||||
|
Subject: [PATCH] Fix documentation in `haddock-api` (#957)
|
||||||
|
|
||||||
|
* Fix misplaced Haddocks in Haddock itself
|
||||||
|
|
||||||
|
Haddock should be able to generate documentation for 'haddock-api'
|
||||||
|
again.
|
||||||
|
|
||||||
|
* Make CI check that documentation can be built.
|
||||||
|
|
||||||
|
* Add back a doc that is OK
|
||||||
|
---
|
||||||
|
.travis.yml | 3 +++
|
||||||
|
haddock-api/src/Haddock/Backends/LaTeX.hs | 10 +++++-----
|
||||||
|
2 files changed, 8 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
|
||||||
|
index 4e0e6eba..613c6deb 100644
|
||||||
|
--- a/src/Haddock/Backends/LaTeX.hs
|
||||||
|
+++ b/src/Haddock/Backends/LaTeX.hs
|
||||||
|
@@ -243,8 +243,8 @@ ppDocGroup lev doc = sec lev <> braces doc
|
||||||
|
|
||||||
|
-- | Given a declaration, extract out the names being declared
|
||||||
|
declNames :: LHsDecl DocNameI
|
||||||
|
- -> ( LaTeX -- ^ to print before each name in an export list
|
||||||
|
- , [DocName] -- ^ names being declared
|
||||||
|
+ -> ( LaTeX -- to print before each name in an export list
|
||||||
|
+ , [DocName] -- names being declared
|
||||||
|
)
|
||||||
|
declNames (L _ decl) = case decl of
|
||||||
|
TyClD _ d -> (empty, [tcdName d])
|
||||||
|
@@ -444,9 +444,9 @@ ppLPatSig doc docnames ty unicode
|
||||||
|
-- arguments as needed.
|
||||||
|
ppTypeOrFunSig :: HsType DocNameI
|
||||||
|
-> DocForDecl DocName -- ^ documentation
|
||||||
|
- -> ( LaTeX -- ^ first-line (no-argument docs only)
|
||||||
|
- , LaTeX -- ^ first-line (argument docs only)
|
||||||
|
- , LaTeX -- ^ type prefix (argument docs only)
|
||||||
|
+ -> ( LaTeX -- first-line (no-argument docs only)
|
||||||
|
+ , LaTeX -- first-line (argument docs only)
|
||||||
|
+ , LaTeX -- type prefix (argument docs only)
|
||||||
|
)
|
||||||
|
-> Bool -- ^ unicode
|
||||||
|
-> LaTeX
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
Loading…
Reference in a new issue