Skip to content

Commit

Permalink
Allow building with Stackage LTS-21
Browse files Browse the repository at this point in the history
Only required loosening a bunch of bounds and the following conditional
code changes:

* The API of guessTarget changed, accepting an optional UnitId which we
  can't provide.

* pandoc-3.0 renamed the writeDocbook5 function.

For nix users we need to provide pkg-config to build digest now.
  • Loading branch information
sternenseemann authored and jgm committed Jul 4, 2023
1 parent 75899f1 commit 4f81022
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 5 additions & 5 deletions gitit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ Library
mtl,
old-time,
temporary,
pandoc >= 2.9 && < 2.20,
pandoc-types >= 1.20 && < 1.23,
pandoc >= 2.9 && < 2.20 || >= 3.0 && < 3.2,
pandoc-types >= 1.20 && < 1.24,
skylighting >= 0.8.2.3 && < 0.14,
bytestring,
text,
Expand All @@ -149,7 +149,7 @@ Library
filestore >= 0.6.5 && < 0.7,
zlib >= 0.5 && < 0.7,
url >= 2.1,
happstack-server >= 7.5 && < 7.8,
happstack-server >= 7.5 && < 7.9,
base64-bytestring >= 0.1,
xml >= 1.3.5,
hslogger >= 1,
Expand All @@ -162,11 +162,11 @@ Library
json >= 0.4 && < 0.11,
uri-bytestring >= 0.2.3.3,
split,
hoauth2 >= 2.3.0 && < 2.7,
hoauth2 >= 2.3.0 && < 2.9,
xml-conduit >= 1.5 && < 1.10,
http-conduit >= 2.1.6 && < 2.4,
http-client-tls >= 0.2.2 && < 0.4,
aeson >= 0.7 && < 2.1,
aeson >= 0.7 && < 2.2,
uuid >= 1.3 && < 1.4,
network-uri >= 2.6,
network >= 2.6 && < 3.2,
Expand Down
4 changes: 4 additions & 0 deletions src/Network/Gitit/Initialize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ createDefaultPages conf = do
RST -> writeRST defOpts <=< toPandoc
Textile -> writeTextile defOpts <=< toPandoc
Org -> writeOrg defOpts <=< toPandoc
#if MIN_VERSION_pandoc(3,0,0)
DocBook -> writeDocBook5 defOpts <=< toPandoc
#else
DocBook -> writeDocbook5 defOpts <=< toPandoc
#endif
MediaWiki -> writeMediaWiki defOpts <=< toPandoc
CommonMark -> writeCommonMark defOpts <=< toPandoc

Expand Down
4 changes: 4 additions & 0 deletions src/Network/Gitit/Plugins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ loadPlugin pluginName = do
-- initDynFlags
unless ("Network.Gitit.Plugin." `isPrefixOf` pluginName)
$ do
#if __GLASGOW_HASKELL__ >= 904
addTarget =<< guessTarget pluginName Nothing Nothing
#else
addTarget =<< guessTarget pluginName Nothing
#endif
r <- load LoadAllTargets
case r of
Failed -> error $ "Error loading plugin: " ++ pluginName
Expand Down
6 changes: 2 additions & 4 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
nix:
enable: false
packages: [zlib zlib.dev]
packages: [zlib zlib.dev pkg-config]

flags:
pandoc:
Expand All @@ -18,6 +18,4 @@ extra-deps:
- filestore-0.6.5
- recaptcha-0.1.0.4

resolver: lts-20.8
nix:
packages: [zlib]
resolver: lts-21.1

0 comments on commit 4f81022

Please sign in to comment.