Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: da3ee10b6b84
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 71e24364c977
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 2, 2021

  1. 3
    Copy the full SHA
    88632b7 View commit details
  2. Copy the full SHA
    e4cd9a8 View commit details
  3. Merge pull request #108184 from lovesegfault/command-not-found-nix-shell

    nixos/command-not-found: don't suggest nix-env
    flokli authored Jan 2, 2021
    Copy the full SHA
    71e2436 View commit details
Showing with 8 additions and 7 deletions.
  1. +8 −7 nixos/modules/programs/command-not-found/command-not-found.pl
15 changes: 8 additions & 7 deletions nixos/modules/programs/command-not-found/command-not-found.pl
Original file line number Diff line number Diff line change
@@ -27,25 +27,26 @@
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.
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"} // "") {
exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
} else {
print STDERR <<EOF;
The program ‘$program’ is currently not installed. You can install it by typing:
nix-env -iA nixos.$package
The program '$program' is not in your PATH. You can make it available in a
ephemeral shell by typing:
nix-shell -p $package
EOF
}
} else {
print STDERR <<EOF;
The program $program is currently not installed. It is provided by
several packages. You can install it by typing one of the following:
The program '$program' is not in your PATH. It is provided by several packages.
You can make it available in a ephemeral shell by typing one of the following:
EOF
print STDERR " nix-env -iA nixos.$_->{package}\n" foreach @$res;
print STDERR " nix-shell -p $_->{package}\n" foreach @$res;
}

exit 127;