File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 8
8
, gnugrep
9
9
, findutils
10
10
, gnused
11
+ , lib
12
+ , mkShellNoCC
11
13
} :
12
14
let
13
15
runtimeInputs = [
14
- openssh
15
16
gitMinimal # for git flakes
16
17
rsync
17
18
nix
24
25
in
25
26
( writeShellApplication {
26
27
name = "nixos-anywhere" ;
27
- text = builtins . readFile ./nixos-anywhere.sh ;
28
+ # We prefer the system's openssh over our own, since it might come with features not present in ours:
29
+ # https://github.com/numtide/nixos-anywhere/issues/62
30
+ text = ''
31
+ export PATH=$PATH:${ lib . getBin openssh }
32
+ ${ builtins . readFile ./nixos-anywhere.sh }
33
+ '' ;
28
34
inherit runtimeInputs ;
29
35
} ) // {
30
- # also expose this attribute to other derivations
31
- inherit runtimeInputs ;
36
+ # Dependencies for our devshell
37
+ devShell = mkShellNoCC {
38
+ packages = runtimeInputs ++ [ openssh ] ;
39
+ } ;
32
40
}
Original file line number Diff line number Diff line change 4
4
nixos-anywhere = pkgs . callPackage ./. { } ;
5
5
default = config . packages . nixos-anywhere ;
6
6
} ;
7
- devShells . default = pkgs . mkShellNoCC {
8
- packages = config . packages . nixos-anywhere . runtimeInputs ;
9
- } ;
7
+ devShells . default = config . packages . nixos-anywhere . devShell ;
10
8
} ;
11
9
}
You can’t perform that action at this time.
0 commit comments