From c1f215aff8fd0051618054f2324d3de844514a61 Mon Sep 17 00:00:00 2001 From: lucasew Date: Wed, 1 Jul 2026 14:01:37 -0300 Subject: [PATCH] rsync: fix pkgsStatic itemize test failure When cross-compiling (e.g. pkgsStatic), configure cannot run the link()-hardlinks-symlinks probe and defaults to no. On Linux that leaves hardlink_symlinks false while --copy-dest/--link-dest still itemize identical symlinks with blank attribute flags, so testsuite/itemize.test fails. Set rsync_cv_can_hardlink_symlink=yes for Linux cross builds. Resolves: #537437 Assisted-by: Grok (xAI) --- pkgs/by-name/rs/rsync/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/rs/rsync/package.nix b/pkgs/by-name/rs/rsync/package.nix index a102ff36cc15..cdeec0aac5a8 100644 --- a/pkgs/by-name/rs/rsync/package.nix +++ b/pkgs/by-name/rs/rsync/package.nix @@ -85,6 +85,14 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64) [ # fix `multiversioning needs 'ifunc' which is not supported on this target` error "--disable-roll-simd" + ] + # Linux can hard-link symlinks; configure defaults this check to "no" when + # cross-compiling (e.g. pkgsStatic) because it cannot run the probe. + # That leaves hardlink_symlinks false while itemize still reports identical + # --copy-dest/--link-dest symlinks with blank attribute flags, so + # testsuite/itemize.test fails (https://github.com/NixOS/nixpkgs/issues/537437). + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform != stdenv.buildPlatform) [ + "rsync_cv_can_hardlink_symlink=yes" ]; enableParallelBuilding = true;