From cab65ea9c6963bfffe73524b1485378b6305c398 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:27:42 +0100 Subject: [PATCH] guix, refactor: Move duplicated `profiledir_for_host()` to `prelude.bash` --- contrib/guix/guix-build | 8 -------- contrib/guix/guix-codesign | 8 -------- contrib/guix/libexec/prelude.bash | 9 +++++++++ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 9c78c2a2a0b..a02c3603e19 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -294,14 +294,6 @@ for host in $HOSTS; do make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} done -# Usage: profiledir_for_host HOST SUFFIX -# -# HOST: The current platform triple we're building for -# -profiledir_for_host() { - echo "${PROFILES_BASE}/${1}${2:+-${2}}" -} - ######### # BUILD # diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign index 230499c0596..f985fd4c2fd 100755 --- a/contrib/guix/guix-codesign +++ b/contrib/guix/guix-codesign @@ -223,14 +223,6 @@ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --f OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}" mkdir -p "$OUTDIR_BASE" -# Usage: profiledir_for_host HOST SUFFIX -# -# HOST: The current platform triple we're building for -# -profiledir_for_host() { - echo "${PROFILES_BASE}/${1}${2:+-${2}}" -} - ######### # BUILD # ######### diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index fbebd2a1aee..c13f24c538a 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -89,6 +89,15 @@ outdir_for_host() { echo "${OUTDIR_BASE}/${1}${2:+-${2}}" } +# Usage: profiledir_for_host HOST [SUFFIX] +# +# HOST: The current platform triple we're building for +# SUFFIX: Optional. If provided, appended to the directory name as "-SUFFIX" +# +profiledir_for_host() { + echo "${PROFILES_BASE}/${1}${2:+-${2}}" +} + ################ # Set common variables ################