mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 03:06:30 +00:00
Hackage rejected the previous version, though it worked fine. The problem was that with two pandoc.hs files in different directories, one of them wasn't being included in the sdist tarball. To work around this, put the WASM exported functions in a library module that is conditionally imported.
110 lines
3.4 KiB
Plaintext
110 lines
3.4 KiB
Plaintext
cabal-version: 2.4
|
|
name: pandoc-cli
|
|
version: 3.9
|
|
build-type: Simple
|
|
license: GPL-2.0-or-later
|
|
license-file: COPYING.md
|
|
copyright: (c) 2006-2024 John MacFarlane
|
|
author: John MacFarlane <jgm@berkeley.edu>
|
|
maintainer: John MacFarlane <jgm@berkeley.edu>
|
|
bug-reports: https://github.com/jgm/pandoc/issues
|
|
stability: alpha
|
|
homepage: https://pandoc.org
|
|
category: Text
|
|
synopsis: Conversion between documentation formats
|
|
description: Pandoc-cli provides a command-line executable that uses the
|
|
pandoc library to convert between markup formats.
|
|
extra-source-files:
|
|
man/pandoc.1
|
|
man/pandoc-lua.1
|
|
man/pandoc-server.1
|
|
source-repository head
|
|
type: git
|
|
location: https://github.com/jgm/pandoc.git
|
|
|
|
flag lua
|
|
description: Support custom modifications and conversions with the
|
|
pandoc Lua scripting engine.
|
|
default: True
|
|
|
|
flag server
|
|
Description: Include support for running pandoc as an HTTP server.
|
|
Default: True
|
|
|
|
flag repl
|
|
Description: Include support for running a pandoc Lua repl.
|
|
Default: True
|
|
|
|
flag nightly
|
|
Description: Add '-nightly-COMPILEDATE' to the output of '--version'.
|
|
Default: False
|
|
|
|
common common-options
|
|
default-language: Haskell2010
|
|
other-extensions: OverloadedStrings
|
|
build-depends: base >= 4.12 && < 5
|
|
ghc-options: -Wall -fno-warn-unused-do-bind
|
|
-Wincomplete-record-updates
|
|
-Wnoncanonical-monad-instances
|
|
-Wcpp-undef
|
|
-Wincomplete-uni-patterns
|
|
-Widentities
|
|
-Wpartial-fields
|
|
-Wmissing-signatures
|
|
-fhide-source-paths
|
|
|
|
if impl(ghc >= 8.10)
|
|
ghc-options: -Wunused-packages
|
|
|
|
if impl(ghc >= 9.0)
|
|
ghc-options: -Winvalid-haddock
|
|
|
|
if os(windows)
|
|
cpp-options: -D_WINDOWS
|
|
|
|
common common-executable
|
|
import: common-options
|
|
ghc-options: -rtsopts -with-rtsopts=-H64m
|
|
|
|
executable pandoc
|
|
import: common-executable
|
|
main-is: pandoc.hs
|
|
hs-source-dirs: src
|
|
buildable: True
|
|
-- Note: we always link to an exact version of pandoc, with the
|
|
-- same version as this package:
|
|
build-depends: pandoc == 3.9, text
|
|
other-modules: PandocCLI.Lua
|
|
, PandocCLI.Server
|
|
|
|
if arch(wasm32)
|
|
hs-source-dirs: wasm
|
|
other-modules: PandocWasm
|
|
cpp-options: -DINCLUDE_WASM
|
|
build-depends: aeson, containers, bytestring, skylighting, filepath, pandoc-lua-engine
|
|
ghc-options: -optl-Wl,--export=__wasm_call_ctors,--export=hs_init_with_rtsopts,--export=malloc,--export=convert,--export=query
|
|
|
|
if flag(nightly)
|
|
cpp-options: -DNIGHTLY
|
|
build-depends: template-haskell,
|
|
time
|
|
if flag(server)
|
|
build-depends: pandoc-server >= 0.1.1 && < 0.2,
|
|
wai-extra >= 3.0.24,
|
|
warp,
|
|
safe
|
|
hs-source-dirs: server
|
|
else
|
|
hs-source-dirs: no-server
|
|
|
|
if flag(lua)
|
|
build-depends: pandoc-lua-engine >= 0.5.1 && < 0.6
|
|
hs-source-dirs: lua
|
|
else
|
|
hs-source-dirs: no-lua
|
|
|
|
if flag(repl)
|
|
build-depends: hslua-cli >= 1.4.1 && < 1.5,
|
|
temporary >= 1.1 && < 1.4
|
|
cpp-options: -DREPL
|