Skip to content

Commit bea2862

Browse files
vancluevermergify[bot]
authored andcommitted
Prefer system rsync
This sets up the package derivation to prefer the system rsync in the same way the system SSH is preferred, to prevent issues that may arise (e.g. crashes) that can arise from mixing the system SSH with the derivation-provided rsync. Fixes #242.
1 parent 0a929da commit bea2862

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
let
1919
runtimeDeps = [
2020
gitMinimal # for git flakes
21-
rsync
2221
# pinned because nix-copy-closure hangs if ControlPath provided for SSH: https://github.com/NixOS/nix/issues/8480
2322
(if lib.versionAtLeast nix.version "2.16" then nix else nixVersions.nix_2_16)
2423
coreutils
@@ -39,13 +38,15 @@ stdenv.mkDerivation {
3938
4039
# We prefer the system's openssh over our own, since it might come with features not present in ours:
4140
# https://github.com/numtide/nixos-anywhere/issues/62
41+
#
42+
# We also prefer system rsync to prevent crashes between rsync and ssh.
4243
wrapProgram $out/bin/nixos-anywhere \
43-
--prefix PATH : ${lib.makeBinPath runtimeDeps} --suffix PATH : ${lib.makeBinPath [ openssh ]}
44+
--prefix PATH : ${lib.makeBinPath runtimeDeps} --suffix PATH : ${lib.makeBinPath [ openssh rsync ]}
4445
'';
4546

4647
# Dependencies for our devshell
4748
passthru.devShell = mkShellNoCC {
48-
packages = runtimeDeps ++ [ openssh terraform-docs ];
49+
packages = runtimeDeps ++ [ openssh rsync terraform-docs ];
4950
};
5051

5152
meta = with lib; {

0 commit comments

Comments
 (0)