pantry/projects/haskell.org/package.yml
2023-10-01 21:27:27 -04:00

84 lines
2.1 KiB
YAML

distributable: ~
versions:
github: ghc/ghc/tags
strip:
- /^ghc-/
- /-release$/
provides:
- bin/ghc
- bin/ghc-{{version.marketing}}
- bin/ghc-{{version}}
- bin/ghc-pkg
- bin/ghc-pkg-{{version.marketing}}
- bin/ghc-pkg-{{version}}
- bin/ghci
- bin/ghci-{{version.marketing}}
- bin/ghci-{{version}}
- bin/ghcup
- bin/haddock
- bin/haddock-{{version.marketing}}
- bin/haddock-{{version}}
- bin/hp2ps
- bin/hp2ps-{{version.marketing}}
- bin/hp2ps-{{version}}
- bin/hpc
- bin/hpc-{{version.marketing}}
- bin/hpc-{{version}}
- bin/hsc2hs
- bin/hsc2hs-{{version.marketing}}
- bin/hsc2hs-{{version}}
- bin/runghc
- bin/runghc-{{version.marketing}}
- bin/runghc-{{version}}
- bin/runhaskell
- bin/runhaskell-{{version.marketing}}
- bin/runhaskell-{{version}}
dependencies:
gnu.org/gmp: 6
invisible-island.net/ncurses: 6
sourceware.org/libffi: 3
linux:
github.com/numactl/numactl: ^2
warnings:
- vendored
build:
dependencies:
curl.se: '*'
script:
- curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
- PATH={{prefix}}/.ghcup/bin:$PATH
- ghcup install ghc {{version}}
- ghcup set ghc {{version}}
- run: ln -s .ghcup/* .
working-directory: ${{prefix}}
- run: |
find . -type f -print0 | xargs -0 sed -i.bak -e "s|$PKGX_DIR|\$PKGX_DIR|g"
rm *.bak
working-directory: ${{prefix}}/ghc/{{version}}/bin
- run: |
sed -i.bak -e "s|$PKGX_DIR|\$PKGX_DIR|g" env
rm env.bak
working-directory: ${{prefix}}/.ghcup
- run: |
find . -type f -name \*.conf -print0 | xargs -0 sed -i.bak -e 's|{{prefix}}|${pkgroot}/../../../../..|g'
find . -type f -name \*.conf.bak -delete
working-directory: ${{prefix}}/ghc/{{version}}/lib/ghc-{{version}}/package.conf.d
if: <9.4
env:
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
BOOTSTRAP_HASKELL_NO_UPGRADE: 1
BOOTSTRAP_HASKELL_MINIMAL: 1
GHCUP_INSTALL_BASE_PREFIX: ${{prefix}}
GHCUP_SKIP_UPDATE_CHECK: 1
test:
script:
- ghc-pkg recache
- ghc-pkg check
- test "$(runghc $FIXTURE)" = "Hello World"
fixture: main = putStrLn "Hello World"