@@ -27,8 +27,8 @@ if (!defined $res || scalar @$res == 0) {
2727 my $package = @$res[0]->{package};
2828 if ($ENV{"NIX_AUTO_INSTALL"} // "") {
2929 print STDERR <<EOF;
30−The program ‘$program’ is currently not installed. It is provided by
31−the package ‘$package’, which I will now install for you.
30+The program '$program' is currently not installed. It is provided by
31+the package '$package', which I will now install for you.
3232EOF
3333 ;
3434 exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
@@ -36,16 +36,17 @@ EOF
3636 exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
3737 } else {
3838 print STDERR <<EOF;
39−The program ‘$program’ is currently not installed. You can install it by typing:
40− nix-env -iA nixos.$package
39+The program '$program' is not in your PATH. You can make it available in a
40+ephemeral shell by typing:
41+ nix-shell -p $package
4142EOF
4243 }
4344} else {
4445 print STDERR <<EOF;
45−The program ‘$program’ is currently not installed. It is provided by
46−several packages. You can install it by typing one of the following:
46+The program '$program' is not in your PATH. It is provided by several packages.
47+You can make it available in a ephemeral shell by typing one of the following:
4748EOF
48− print STDERR " nix-env -iA nixos.$_->{package}\n" foreach @$res;
49+ print STDERR " nix-shell -p $_->{package}\n" foreach @$res;
4950}
5051
5152exit 127;