minimal-bootstrap: fix early-musl-userland flake on parallel builds

This commit is contained in:
Ben Siraphob
2026-05-06 15:51:42 +00:00
parent 122be4c160
commit dd134e69e6
4 changed files with 39 additions and 0 deletions
@@ -4,6 +4,7 @@
hostPlatform,
fetchurl,
bash,
coreutils,
tinycc,
gnumakeBoot,
gnupatch,
@@ -37,6 +38,7 @@ bash.runCommand "${pname}-${version}"
inherit pname version meta;
nativeBuildInputs = [
coreutils
tinycc.compiler
gnumakeBoot
gnupatch
@@ -59,6 +61,13 @@ bash.runCommand "${pname}-${version}"
tar xzf ${src}
cd make-${version}
# Defeat parallel-build automake regen race, see gnused/default.nix.
touch Makefile.in Makefile aclocal.m4 config.h.in configure 2>/dev/null || true
for f in */Makefile.in; do touch "$f" 2>/dev/null || true; done
chmod +x configure config.guess config.sub install-sh missing compile \
depcomp mkinstalldirs help2man 2>/dev/null || true
[ -d build-aux ] && chmod +x build-aux/* 2>/dev/null || true
# Patch
${lib.concatMapStringsSep "\n" (f: "patch -Np1 -i ${f}") patches}
@@ -4,6 +4,7 @@
hostPlatform,
fetchurl,
bash,
coreutils,
gnumake,
tinycc,
gnused,
@@ -33,6 +34,7 @@ bash.runCommand "${pname}-${version}"
inherit pname version meta;
nativeBuildInputs = [
coreutils
gnumake
tinycc.compiler
gnused
@@ -53,6 +55,14 @@ bash.runCommand "${pname}-${version}"
tar xzf ${src}
cd sed-${version}
# Defeat parallel-build automake regen race: refresh generated-file
# mtimes and restore +x on autotools helpers.
touch Makefile.in Makefile aclocal.m4 config.h.in configure 2>/dev/null || true
for f in */Makefile.in; do touch "$f" 2>/dev/null || true; done
chmod +x configure config.guess config.sub install-sh missing compile \
depcomp mkinstalldirs help2man 2>/dev/null || true
[ -d build-aux ] && chmod +x build-aux/* 2>/dev/null || true
# Configure
export CC="tcc -B ${tinycc.libs}/lib"
export LD=tcc
@@ -4,6 +4,7 @@
hostPlatform,
fetchurl,
bash,
coreutils,
tinycc,
gnumake,
gnused,
@@ -25,6 +26,7 @@ bash.runCommand "${pname}-${version}"
inherit pname version meta;
nativeBuildInputs = [
coreutils
tinycc.compiler
gnumake
gnused
@@ -45,6 +47,14 @@ bash.runCommand "${pname}-${version}"
rm tar.tar
cd tar-${version}
# untar drops mtimes and +x on autotools helpers, restore them so
# parallel builds don't trip into automake regeneration.
touch Makefile.in Makefile aclocal.m4 config.h.in configure 2>/dev/null || true
for f in */Makefile.in; do touch "$f" 2>/dev/null || true; done
chmod +x configure config.guess config.sub install-sh missing compile \
depcomp mkinstalldirs help2man 2>/dev/null || true
[ -d build-aux ] && chmod +x build-aux/* 2>/dev/null || true
# Configure
export CC="tcc -B ${tinycc.libs}/lib"
bash ./configure \
@@ -4,6 +4,7 @@
hostPlatform,
fetchurl,
bash,
coreutils,
tinycc,
gnumake,
gnugrep,
@@ -26,6 +27,7 @@ bash.runCommand "${pname}-${version}"
inherit pname version meta;
nativeBuildInputs = [
coreutils
tinycc.compiler
gnumake
gnused
@@ -46,6 +48,14 @@ bash.runCommand "${pname}-${version}"
rm tar.tar
cd tar-${version}
# untar drops mtimes and +x on autotools helpers, restore them so
# parallel builds don't trip into automake regeneration.
touch Makefile.in Makefile aclocal.m4 config.h.in configure 2>/dev/null || true
for f in */Makefile.in; do touch "$f" 2>/dev/null || true; done
chmod +x configure config.guess config.sub install-sh missing compile \
depcomp mkinstalldirs help2man 2>/dev/null || true
[ -d build-aux ] && chmod +x build-aux/* 2>/dev/null || true
# Configure
export CC="tcc -B ${tinycc.libs}/lib"
export LD=tcc