From faa9d4345ff584eb2a7c09f4087c487c381e6b42 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:24:25 +0100 Subject: [PATCH] guix, refactor: Move duplicated `outdir_for_host()` to `prelude.bash` --- contrib/guix/guix-build | 8 -------- contrib/guix/guix-codesign | 9 --------- contrib/guix/libexec/prelude.bash | 8 ++++++++ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index ac7888409e4..9c78c2a2a0b 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: outdir_for_host HOST SUFFIX -# -# HOST: The current platform triple we're building for -# -outdir_for_host() { - echo "${OUTDIR_BASE}/${1}${2:+-${2}}" -} - # Usage: profiledir_for_host HOST SUFFIX # # HOST: The current platform triple we're building for diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign index 8c8682ddd0a..230499c0596 100755 --- a/contrib/guix/guix-codesign +++ b/contrib/guix/guix-codesign @@ -146,15 +146,6 @@ fi # Codesigning tarballs SHOULD exist ################ -# Usage: outdir_for_host HOST SUFFIX -# -# HOST: The current platform triple we're building for -# -outdir_for_host() { - echo "${OUTDIR_BASE}/${1}${2:+-${2}}" -} - - codesigning_tarball_for_host() { case "$1" in *mingw*) diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index 166675e8bf0..fbebd2a1aee 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -80,6 +80,14 @@ time-machine() { -- "$@" } +# Usage: outdir_for_host HOST [SUFFIX] +# +# HOST: The current platform triple we're building for +# SUFFIX: Optional. If provided, appended to the directory name as "-SUFFIX" +# +outdir_for_host() { + echo "${OUTDIR_BASE}/${1}${2:+-${2}}" +} ################ # Set common variables