Unverified Commit c0b15507 authored by r-vdp's avatar r-vdp
Browse files

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
parent 3ded3dec
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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";