minimal-bootstrap: trim gawk-static output

Disable optional gawk features not used by the bootstrap path and prune installed helper files, headers, libraries, documentation, locale data, and awk library scripts. The smoke test now covers a simple awk program, not only --version.

Size impact against upstream/staging:

- gawk-static closure: 6.001 MiB -> 1.549 MiB (-4.453 MiB)

Assisted-by: codex with gpt-5.5-high
This commit is contained in:
Aliaksandr
2026-06-08 00:09:36 +03:00
parent ffe5913f56
commit b200ae73ec
@@ -48,6 +48,7 @@ bash.runCommand "${pname}-${version}"
result:
bash.runCommand "${pname}-get-version-${version}" { } ''
${result}/bin/awk --version
${result}/bin/awk 'BEGIN { if (2 + 2 != 4) exit 1 }'
mkdir $out
'';
}
@@ -62,6 +63,10 @@ bash.runCommand "${pname}-${version}"
--build=${buildPlatform.config} \
--host=${hostPlatform.config} \
--disable-dependency-tracking \
--disable-extensions \
--disable-mpfr \
--disable-nls \
--disable-pma \
CC=musl-gcc \
CFLAGS=-static
@@ -71,4 +76,6 @@ bash.runCommand "${pname}-${version}"
# Install
make -j $NIX_BUILD_CORES install-strip
rm $out/bin/gawkbug
rm -rf $out/etc $out/include $out/lib $out/libexec
rm -rf $out/share
''