From 96637bf80e24b060abf6556d362f2ce6ce19532f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 25 Mar 2024 21:45:20 -0300 Subject: [PATCH] build-style/haskell-stack: place stack root in /host to make it persistent --- common/build-style/haskell-stack.sh | 7 +++---- common/environment/build-style/haskell-stack.sh | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/build-style/haskell-stack.sh b/common/build-style/haskell-stack.sh index 2a28ffc9881168..ca2a9fbeefc7e6 100644 --- a/common/build-style/haskell-stack.sh +++ b/common/build-style/haskell-stack.sh @@ -20,11 +20,10 @@ do_build() { msg_error "Stackage version not set in \$stackage.\n" fi msg_normal "Using stackage resolver ${stackage}.\n" - STACK_ROOT="$wrksrc/.stack" \ - stack init ${_stack_args} --force --resolver ${stackage} + stack init ${_stack_args} --force --resolver ${stackage} fi - STACK_ROOT="$wrksrc/.stack" stack ${_stack_args} ${makejobs} build \ + stack ${_stack_args} ${makejobs} build --ghc-options ${makejobs} \ ${make_build_args} } @@ -32,6 +31,6 @@ do_install() { local _stack_args="--system-ghc --skip-ghc-check" vmkdir usr/bin - STACK_ROOT="$wrksrc/.stack" stack ${_stack_args} install \ + stack ${_stack_args} install \ ${make_build_args} --local-bin-path=${DESTDIR}/usr/bin } diff --git a/common/environment/build-style/haskell-stack.sh b/common/environment/build-style/haskell-stack.sh index 6b47c121512378..4356b6a7247349 100644 --- a/common/environment/build-style/haskell-stack.sh +++ b/common/environment/build-style/haskell-stack.sh @@ -1 +1,3 @@ hostmakedepends+=" ghc stack" + +export STACK_ROOT="/host/stack/${XBPS_TARGET_MACHINE}"