summary refs log tree commit diff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2021-10-04 12:43:39 -0700
committerBernardo Meurer <bernardo@meurer.org>2021-10-04 12:43:39 -0700
commitc301c1995e118c86308ed61359e45c96a741fac9 (patch)
tree4cf2bbe13100afd4d71cac1329bd68b2e43498e9
parent0699530f08290f34c532beedd66046825d9756fa (diff)
downloadnixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar.gz
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar.bz2
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar.lz
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar.xz
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.tar.zst
nixpkgs-c301c1995e118c86308ed61359e45c96a741fac9.zip
command-not-found: remove NIX_AUTO_INSTALL
-rw-r--r--nixos/modules/programs/command-not-found/command-not-found.pl9
1 files changed, 1 insertions, 8 deletions
diff --git a/nixos/modules/programs/command-not-found/command-not-found.pl b/nixos/modules/programs/command-not-found/command-not-found.pl
index 6e275bcc8be..220d057b7f4 100644
--- a/nixos/modules/programs/command-not-found/command-not-found.pl
+++ b/nixos/modules/programs/command-not-found/command-not-found.pl
@@ -25,14 +25,7 @@ if (!defined $res || scalar @$res == 0) {
     print STDERR "$program: command not found\n";
 } elsif (scalar @$res == 1) {
     my $package = @$res[0]->{package};
-    if ($ENV{"NIX_AUTO_INSTALL"} // "") {
-        print STDERR <<EOF;
-The program '$program' is currently not installed. It is provided by
-the package '$package', which I will now install for you.
-EOF
-        ;
-        exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
-    } elsif ($ENV{"NIX_AUTO_RUN"} // "") {
+    if ($ENV{"NIX_AUTO_RUN"} // "") {
         exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
     } else {
         print STDERR <<EOF;