fix(steps-guix): support explicit build dir for source-less seed packages

This commit is contained in:
vxtls 2026-03-04 16:25:28 -05:00
parent 893a320f6f
commit ea69ae93b8
5 changed files with 13 additions and 4 deletions

View file

@ -181,7 +181,7 @@ build() {
pkg=$1
get_revision "${pkg}"
script_name=${2:-pass$((revision+1)).sh}
dirname=${3:-${pkg}}
build_dir=${3:-${pkg}}
# shellcheck disable=SC2015
bin_preseed && return || true # Normal build if preseed fails
@ -206,6 +206,9 @@ build() {
# shellcheck source=/dev/null
. "${build_script}"
fi
if [ -n "${BUILD_DIRNAME+x}" ]; then
build_dir="${BUILD_DIRNAME}"
fi
echo "${pkg}: getting sources."
build_stage=src_get
@ -216,7 +219,7 @@ build() {
call $build_stage
unset EXTRA_DISTFILES
cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$)
cd "${build_dir}" || (echo "Cannot cd into build/${build_dir}!"; kill $$)
echo "${pkg}: preparing source."
build_stage=src_prepare

View file

@ -4,6 +4,7 @@ src_get() { :; }
src_unpack() { :; }
src_prepare() { :; }
src_configure() { :; }
BUILD_DIRNAME=.
src_compile() {
local stage

View file

@ -4,6 +4,7 @@ src_get() { :; }
src_unpack() { :; }
src_prepare() { :; }
src_configure() { :; }
BUILD_DIRNAME=.
src_compile() {
local stage copied

View file

@ -4,6 +4,7 @@ src_get() { :; }
src_unpack() { :; }
src_prepare() { :; }
src_configure() { :; }
BUILD_DIRNAME=.
src_compile() {
local stage dist

View file

@ -181,7 +181,7 @@ build() {
pkg=$1
get_revision "${pkg}"
script_name=${2:-pass$((revision+1)).sh}
dirname=${3:-${pkg}}
build_dir=${3:-${pkg}}
# shellcheck disable=SC2015
bin_preseed && return || true # Normal build if preseed fails
@ -206,6 +206,9 @@ build() {
# shellcheck source=/dev/null
. "${build_script}"
fi
if [ -n "${BUILD_DIRNAME+x}" ]; then
build_dir="${BUILD_DIRNAME}"
fi
echo "${pkg}: getting sources."
build_stage=src_get
@ -216,7 +219,7 @@ build() {
call $build_stage
unset EXTRA_DISTFILES
cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$)
cd "${build_dir}" || (echo "Cannot cd into build/${build_dir}!"; kill $$)
echo "${pkg}: preparing source."
build_stage=src_prepare