@@ -25,14 +25,7 @@ if (!defined $res || scalar @$res == 0) {
25 print STDERR "$program: command not found\n";
25 print STDERR "$program: command not found\n";
26} elsif (scalar @$res == 1) {
26} elsif (scalar @$res == 1) {
27 my $package = @$res[0]->{package};
27 my $package = @$res[0]->{package};
28− if ($ENV{"NIX_AUTO_INSTALL"} // "") {
30−The program '$program' is currently not installed. It is provided by
31−the package '$package', which I will now install for you.
34− exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
35− } elsif ($ENV{"NIX_AUTO_RUN"} // "") {
28+ if ($ENV{"NIX_AUTO_RUN"} // "") {
36 exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
29 exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
38 print STDERR <<EOF;
31 print STDERR <<EOF;