66: prefer system's openssh r=phaer a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
bors[bot] 2023-02-07 09:17:43 +00:00 committed by GitHub
commit 74c8547240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -8,10 +8,11 @@
, gnugrep
, findutils
, gnused
, lib
, mkShellNoCC
}:
let
runtimeInputs = [
openssh
gitMinimal # for git flakes
rsync
nix
@ -24,9 +25,16 @@ let
in
(writeShellApplication {
name = "nixos-anywhere";
text = builtins.readFile ./nixos-anywhere.sh;
# We prefer the system's openssh over our own, since it might come with features not present in ours:
# https://github.com/numtide/nixos-anywhere/issues/62
text = ''
export PATH=$PATH:${lib.getBin openssh}
${builtins.readFile ./nixos-anywhere.sh}
'';
inherit runtimeInputs;
}) // {
# also expose this attribute to other derivations
inherit runtimeInputs;
# Dependencies for our devshell
devShell = mkShellNoCC {
packages = runtimeInputs ++ [ openssh ];
};
}

View File

@ -4,8 +4,6 @@
nixos-anywhere = pkgs.callPackage ./. { };
default = config.packages.nixos-anywhere;
};
devShells.default = pkgs.mkShellNoCC {
packages = config.packages.nixos-anywhere.runtimeInputs;
};
devShells.default = config.packages.nixos-anywhere.devShell;
};
}