Skip to content

testing/pandoc: new aport

Jean-Louis Fuchs requested to merge jeanlf/aports:pandoc into master

edited

Building packages with cabal potentially violates Alpine's packaging policies. Building it properly with Setup.hs would mean adding 119 Haskell-packages to Alpine. On the other hand, rust- (cargo) and go-packages have similar problems, and Alpine seems to have relaxed the policies; also, pandoc has become such integral part of many documentation tools.

The bad points:

  • The build takes very long

  • Always links static libraries (edit: I guess that is ok, cargo and go are similar)

  • enable-split-sections does not work unless it builds a fully static binary

  • The binary without split-sections (dead-code elimination) is 160MB

  • Therefore I enabled fully static

  • It embeds the data into the binary (edit: I tested that, its just 250k, and I think there is no other downside)

  • Cabal 3.0 has no more(?) sandbox, APKBUILD changes the CABAL_DIR (edit: After many tests and builds, this seems to work quite weill)

  • There is no way use cabal build, without the subsequent cabal install rebuilding the package (edit: fixed! I don't what I did wrong, but after many transformation in the pacakge it started to work)

The good points:

  • At least the dependencies are frozen (lockfile)

  • Embedding the data makes pandoc very portable, and they release pandoc like that on GitHub

  • I was able to make the binary much smaller than with default build options: 60MB (the GitHub release is also 60MB)

Edited by Jean-Louis Fuchs

Merge request reports