Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] build-style/haskell-stack: place stack root in /host to make it persistent
Date: Tue, 26 Mar 2024 01:45:19 +0100	[thread overview]
Message-ID: <20240326004519.A4A6D22321@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49526@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages stack-root
https://github.com/void-linux/void-packages/pull/49526

[RFC] build-style/haskell-stack: place stack root in /host to make it persistent
Similar to `CARGO_HOME=/host/cargo` maybe we should set `STACK_ROOT=/host/stack`.

@leahneukirchen any thoughts?

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49526.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-stack-root-49526.patch --]
[-- Type: text/x-diff, Size: 1768 bytes --]

From ec42cf33926cffef4f0b8934004bd51426e38ff3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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..327183df96a17c 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}"

  parent reply	other threads:[~2024-03-26  0:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 15:43 [PR PATCH] " tornaria
2024-03-25 19:58 ` classabbyamp
2024-03-25 23:53 ` [PR PATCH] [Updated] " tornaria
2024-03-26  0:29 ` [PR REVIEW] " sgn
2024-03-26  0:38 ` classabbyamp
2024-03-26  0:45 ` tornaria [this message]
2024-03-26  0:52 ` tornaria
2024-03-26  1:04 ` [PR PATCH] [Updated] " tornaria
2024-03-26  7:59 ` 0x5c
2024-03-26 18:08 ` tornaria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240326004519.A4A6D22321@inbox.vuxu.org \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).