git.iko.soy/typeable/nixpkgs
on master help sign in
command-not-found: remove NIX_AUTO_INSTALL
c301c19Bernardo Meurer
nixos/modules/programs/command-not-found/command-not-found.pl+1−8
@@ -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"} // "") {
29− 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.
32−EOF
33− ;
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));
37 } else {
30 } else {
38 print STDERR <<EOF;
31 print STDERR <<EOF;