gnu: ghc-pandoc: Update to 2.7.3.

* gnu/packages/haskell-xyz.scm (ghc-pandoc): Update to 2.7.3.
[source]: Add patches to fix tests.
[arguments]: Remove '#:phases'.
[inputs]: Remove 'ghc-deepseq-generics', 'ghc-old-locale', and
'ghc-yaml'; add 'ghc-hslua-module-system', 'ghc-hsyaml', 'ghc-ipynb',
and 'ghc-unicode-transforms'.
[native-inputs]: Add 'ghc-tasty-lua'.
* gnu/packages/patches/ghc-pandoc-fix-html-tests.patch: New file.
* gnu/packages/patches/ghc-pandoc-fix-latex-test.patch: New file.
* gnu/local.mk: Add them.
This commit is contained in:
Timothy Sample 2019-10-31 13:33:38 -04:00
parent 4828e54eaa
commit d9b1567a07
No known key found for this signature in database
GPG key ID: 2AC6A5EC1C357C59
4 changed files with 134 additions and 19 deletions

View file

@ -882,6 +882,8 @@ dist_patch_DATA = \
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \
%D%/packages/patches/ghc-hpack-fix-tests.patch \
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
%D%/packages/patches/ghc-pandoc-fix-html-tests.patch \
%D%/packages/patches/ghc-pandoc-fix-latex-test.patch \
%D%/packages/patches/ghostscript-no-header-id.patch \
%D%/packages/patches/ghostscript-no-header-uuid.patch \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \

View file

@ -7638,30 +7638,18 @@ (define-public ghc-optparse-applicative
(define-public ghc-pandoc
(package
(name "ghc-pandoc")
(version "2.2.1")
(version "2.7.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://hackage.haskell.org/package/pandoc/pandoc-"
version ".tar.gz"))
(patches (search-patches "ghc-pandoc-fix-html-tests.patch"
"ghc-pandoc-fix-latex-test.patch"))
(sha256
(base32
"1dqin92w513l7whg5wdgrngnxsj5mb8gppfvn7kjgyv2pdgpy0zy"))))
"0dpjrr40h54cljzhvixyym07z792a9izg6b9dmqpjlgcg4rj0xx8"))))
(build-system haskell-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'configure 'update-constraints
(lambda _
(substitute* "pandoc.cabal"
(("tasty >= 0\\.11 && < 1\\.1")
"tasty >= 0.11 && < 1.1.1"))))
(add-before 'configure 'patch-tests
(lambda _
;; These tests fail benignly and have been adjusted upstream:
;; <https://github.com/commercialhaskell/stackage/issues/3719>.
(substitute* "test/Tests/Old.hs"
(("lhsWriterTests \"html\"") "[]")))))))
(inputs
`(("ghc-aeson" ,ghc-aeson)
("ghc-aeson-pretty" ,ghc-aeson-pretty)
@ -7670,22 +7658,23 @@ (define-public ghc-pandoc
("ghc-blaze-markup" ,ghc-blaze-markup)
("ghc-cmark-gfm" ,ghc-cmark-gfm)
("ghc-data-default" ,ghc-data-default)
("ghc-deepseq-generics" ,ghc-deepseq-generics)
("ghc-diff" ,ghc-diff)
("ghc-doctemplates" ,ghc-doctemplates)
("ghc-executable-path" ,ghc-executable-path)
("ghc-glob" ,ghc-glob)
("ghc-haddock-library" ,ghc-haddock-library)
("ghc-hslua" ,ghc-hslua)
("ghc-hslua-module-system" ,ghc-hslua-module-system)
("ghc-hslua-module-text" ,ghc-hslua-module-text)
("ghc-hsyaml" ,ghc-hsyaml)
("ghc-http" ,ghc-http)
("ghc-http-client" ,ghc-http-client)
("ghc-http-client-tls" ,ghc-http-client-tls)
("ghc-http-types" ,ghc-http-types)
("ghc-ipynb" ,ghc-ipynb)
("ghc-juicypixels" ,ghc-juicypixels)
("ghc-network" ,ghc-network)
("ghc-network-uri" ,ghc-network-uri)
("ghc-old-locale" ,ghc-old-locale)
("ghc-pandoc-types" ,ghc-pandoc-types)
("ghc-random" ,ghc-random)
("ghc-scientific" ,ghc-scientific)
@ -7696,16 +7685,17 @@ (define-public ghc-pandoc
("ghc-tagsoup" ,ghc-tagsoup)
("ghc-temporary" ,ghc-temporary)
("ghc-texmath" ,ghc-texmath)
("ghc-unicode-transforms" ,ghc-unicode-transforms)
("ghc-unordered-containers" ,ghc-unordered-containers)
("ghc-vector" ,ghc-vector)
("ghc-xml" ,ghc-xml)
("ghc-yaml" ,ghc-yaml)
("ghc-zip-archive" ,ghc-zip-archive)
("ghc-zlib" ,ghc-zlib)))
(native-inputs
`(("ghc-tasty" ,ghc-tasty)
("ghc-tasty-golden" ,ghc-tasty-golden)
("ghc-tasty-hunit" ,ghc-tasty-hunit)
("ghc-tasty-lua" ,ghc-tasty-lua)
("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
("ghc-quickcheck" ,ghc-quickcheck)
("ghc-hunit" ,ghc-hunit)))

View file

@ -0,0 +1,92 @@
This patch is taken from upstream. It fixes two HTML tests that are broken
due to using a Skylighting version greater than or equal to 0.8.2.
From 968d2046a3cb6db661673be580660ac402753c34 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 14 Jul 2019 10:48:14 -0700
Subject: [PATCH] Update test for new skylighting.
---
test/lhs-test.html | 13 ++++++-------
test/lhs-test.html+lhs | 13 ++++++-------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/test/lhs-test.html b/test/lhs-test.html
index 6685555f4..446dd3d95 100644
--- a/test/lhs-test.html
+++ b/test/lhs-test.html
@@ -12,19 +12,18 @@
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
-code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
-code.sourceCode > span:empty { height: 1.2em; }
-.sourceCode { overflow: visible; }
-code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
-code.sourceCode { white-space: pre-wrap; }
-code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le
div.sourceCode
{ }
@media screen {
-code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
index e57dfc105..a5cdb0245 100644
--- a/test/lhs-test.html+lhs
+++ b/test/lhs-test.html+lhs
@@ -12,19 +12,18 @@
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
-code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
-code.sourceCode > span:empty { height: 1.2em; }
-.sourceCode { overflow: visible; }
-code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
-code.sourceCode { white-space: pre-wrap; }
-code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le
div.sourceCode
{ }
@media screen {
-code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
--
2.23.0

View file

@ -0,0 +1,31 @@
This patch is taken from upstream. It fixes a LaTeX test that is broken due
to using a Skylighting version greater than or equal to 0.8.1.1.
From 2cd1c7b30f200d18f1f1bdef1671369e1ad303ed Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 13 Jun 2019 19:33:52 -0700
Subject: [PATCH] Update test for skylighting 0.8.1.1.
---
test/lhs-test.latex | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/lhs-test.latex b/test/lhs-test.latex
index 0442db5ca..a456995a3 100644
--- a/test/lhs-test.latex
+++ b/test/lhs-test.latex
@@ -94,9 +94,9 @@ return a single value:
\begin{Shaded}
\begin{Highlighting}[]
-\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{->}\NormalTok{ c }\OtherTok{->}\NormalTok{ d) }\OtherTok{->}\NormalTok{ a (b, c) d}
+\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{{-}>}\NormalTok{ c }\OtherTok{{-}>}\NormalTok{ d) }\OtherTok{{-}>}\NormalTok{ a (b, c) d}
\NormalTok{unsplit }\OtherTok{=}\NormalTok{ arr }\OperatorTok{.} \FunctionTok{uncurry}
- \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)}
+ \CommentTok{{-}{-} arr (\textbackslash{}op (x,y) {-}> x \textasciigrave{}op\textasciigrave{} y)}
\end{Highlighting}
\end{Shaded}
--
2.23.0