From dd2a8921445a52c60da1c48a479ea599c6f0ccd9 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Mon, 17 Jul 2023 22:13:49 +0200 Subject: [PATCH] nixos/boot/stage-1: chase symlinks when copying binaries The split of util-linux into further outputs (#236463) resulted in ${util-linux.bin}/bin/mount becoming a symlink. This broke zfs in some cases. --- nixos/modules/system/boot/stage-1.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index eec3461de7e7..1e52bd9e02f7 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -102,7 +102,7 @@ let copy_bin_and_libs () { [ -f "$out/bin/$(basename $1)" ] && rm "$out/bin/$(basename $1)" - cp -pdv $1 $out/bin + cp -pdvH $1 $out/bin } # Copy BusyBox.