From c0b1550760f07c15589f22b7eacdd4a1763434fe Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 19 Apr 2026 12:33:22 +0200 Subject: [PATCH] uutils-coreutils: symlink multicall aliases to fix closure size Upstream commit fb76aba95b35 changed the default LN from `ln -sf` to `ln -f`, so each utility alias is now a hardlink to the 14 MiB multicall binary. NAR serialization does not preserve hardlinks, so every alias is stored and downloaded as a full copy, taking the closure from ~61 MiB to ~1.5 GiB. https://github.com/uutils/coreutils/commit/fb76aba95b35bf12b0175d67e4b10b2f9910c5df --- pkgs/by-name/uu/uutils-coreutils/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/uu/uutils-coreutils/package.nix b/pkgs/by-name/uu/uutils-coreutils/package.nix index 3a77aad6cd87..7d41c40b9c72 100644 --- a/pkgs/by-name/uu/uutils-coreutils/package.nix +++ b/pkgs/by-name/uu/uutils-coreutils/package.nix @@ -86,6 +86,10 @@ stdenv.mkDerivation (finalAttrs: { env = { CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec; + # Upstream uses hardlinks for the multicall aliases by default, but NAR + # serialization does not preserve hardlinks, exploding the closure to + # ~100 copies of the 14 MiB binary. + LN = "ln -sf"; } // lib.optionalAttrs selinuxSupport { SELINUX_INCLUDE_DIR = "${lib.getInclude libselinux}/include";