fix(pandoc)

closes #6109
This commit is contained in:
Jacob Heider 2024-06-13 18:14:55 -04:00 committed by Jacob Heider
parent aad8c3bf6d
commit 854d5866dd

View file

@ -1,7 +1,7 @@
distributable: distributable:
#FIXME: pandoc and pandoc-cli have been split :/ #FIXME: pandoc and pandoc-cli have been split :/
# url: https://hackage.haskell.org/package/pandoc-cli{{ version }}/pandoc-cli-{{ version }}.tar.gz # url: https://hackage.haskell.org/package/pandoc-cli{{ version }}/pandoc-cli-{{ version }}.tar.gz
url: https://github.com/jgm/pandoc/archive/refs/tags/{{ version }}.tar.gz url: https://github.com/jgm/pandoc/archive/refs/tags/{{ version.tag }}.tar.gz
strip-components: 1 strip-components: 1
#FIXME pandoc has 4 digit versions : / #FIXME pandoc has 4 digit versions : /
@ -20,9 +20,8 @@ dependencies:
build: build:
dependencies: dependencies:
haskell.org: '>=8.6.5' haskell.org: ~9.4
haskell.org/cabal: ^3 haskell.org/cabal: ^3
crates.io/semverator: ^0
working-directory: pandoc-cli working-directory: pandoc-cli
script: script:
# pandoc 2.x - no pandoc-cli subdirectory # pandoc 2.x - no pandoc-cli subdirectory
@ -31,11 +30,23 @@ build:
- cabal update - cabal update
- mkdir -p {{prefix}}/bin - mkdir -p {{prefix}}/bin
# digest versions above 0.0.1.4 have RPATH issues for us.
# FIXME: this isn't great, but it'll fix any ghc install at build time
# needs install-time customization for a true fix
- run: | - run: |
sed -i.bak -e's/text$/text, digest <0.0.1.4/' pandoc-cli.cabal if ! grep -q 'rpath,{{pkgx.prefix}}' settings; then
rm pandoc-cli.cabal.bak sed -i \
-e 's|\(C compiler flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
-e 's|\(C++ compiler flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
-e 's|\(C compiler link flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
settings
fi
if: darwin
working-directory: ${{deps.haskell.org.prefix}}/.ghcup/ghc/{{deps.haskell.org.version}}/lib/ghc-{{deps.haskell.org.version}}/lib
- cabal v2-install $ARGS - cabal v2-install $ARGS
# else x86-64 segfaults
skip: fix-patchelf
env: env:
ARGS: ARGS:
- --install-method=copy - --install-method=copy