From 3a2649965b33b5d8ad71c24ccefe0bfa229d7fc7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Fri, 22 May 2026 05:42:22 +0300 Subject: [PATCH] minimal-bootstrap: trim findutils-static output Disable NLS and keep only the bootstrap-relevant find and xargs tools. Drop locate, updatedb, frcode, documentation, locale data, and the var directory. Size impact against upstream/staging: - findutils-static closure: 2.830 MiB -> 0.592 MiB (-2.237 MiB) Assisted-by: codex with gpt-5.5-high --- .../linux/minimal-bootstrap/findutils/static.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/minimal-bootstrap/findutils/static.nix b/pkgs/os-specific/linux/minimal-bootstrap/findutils/static.nix index aa68c36eb73b..c6b1c6e2ba0c 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/findutils/static.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/findutils/static.nix @@ -47,6 +47,7 @@ bash.runCommand "${pname}-${version}" result: bash.runCommand "${pname}-get-version-${version}" { } '' ${result}/bin/find --version + ${result}/bin/xargs --version mkdir $out ''; @@ -69,6 +70,7 @@ bash.runCommand "${pname}-${version}" --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ --disable-dependency-tracking \ + --disable-nls \ CC=musl-gcc \ CFLAGS=-static @@ -77,5 +79,8 @@ bash.runCommand "${pname}-${version}" # Install make -j $NIX_BUILD_CORES install-strip - rm $out/bin/updatedb + + # Keep only the bootstrap-relevant find/xargs tools. + rm -f $out/bin/locate $out/bin/updatedb + rm -rf $out/libexec $out/share $out/var ''