Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions srcpkgs/ghcup-hs/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Template file for 'ghcup-hs'
pkgname=ghcup-hs
version=0.1.50.2
revision=1
build_style=cabal
cabal_index_state="2025-05-16T00:00:00Z"
hostmakedepends="ghc cabal-install pkg-config"
makedepends="libffi-devel ncurses-devel zlib-devel bzip2-devel openssl-devel
liblzma-devel"
short_desc="Haskell toolchain installer"
maintainer="rayfadh <rayfadh@duck.com>"
license="LGPL-3.0-only"
homepage="https://www.haskell.org/ghcup/"
changelog="https://raw.githubusercontent.com/haskell/ghcup-hs/master/CHANGELOG.md"
distfiles="https://github.com/haskell/ghcup-hs/archive/v${version}.tar.gz"
checksum=ba2a2ef799fa7810970e09b19a7fdd7b2360ddd64d8e9b0624ab640cca627b89
lib32depends="libffi-devel>=0 ncurses-devel>=0 zlib-devel>=0 bzip2-devel>=0
openssl-devel>=0 xz>=0"
nocross=yes
nopie_files="/usr/bin/ghcup"

do_configure() {
cabal update
cabal configure --prefix=/usr \
--index-state="${cabal_index_state}" \
"--constraint=xz +system-xz"
}

do_build() {
: ${make_cmd:=cabal}
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
make_build_args+=" --ghc-option=-latomic"
fi
${make_cmd} build ${make_build_target} ${makejobs} ${make_build_args}
}

post_install() {
vmkdir usr/share/bash-completion/completions
${DESTDIR}/usr/bin/ghcup \
--bash-completion-script /usr/bin/ghcup \
> ${DESTDIR}/usr/share/bash-completion/completions/ghcup
vmkdir usr/share/zsh/site-functions
${DESTDIR}/usr/bin/ghcup \
--zsh-completion-script /usr/bin/ghcup \
> ${DESTDIR}/usr/share/zsh/site-functions/_ghcup
}