Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

nix-locate can also solve that problem


A naive search is even easier. Right now, on NixOS:

   [nextos@local:~]$ python3
   The program 'python3' is not in your PATH. It is provided by several packages.
   You can make it available in an ephemeral shell by typing one of the following:
     nix-shell -p graalvmCEPackages.graalvm11-ce-full
     nix-shell -p graalvmCEPackages.graalvm17-ce-full
     nix-shell -p graalvmCEPackages.python-installable-svm-java11
     nix-shell -p graalvmCEPackages.python-installable-svm-java17
     nix-shell -p ihaskell
     nix-shell -p python311
     nix-shell -p python311Full
     nix-shell -p python312
     nix-shell -p python38
     nix-shell -p python38Full
     nix-shell -p python39
     nix-shell -p python39Full
     nix-shell -p python3Full
     nix-shell -p python3Minimal
     nix-shell -p qtile
     nix-shell -p sourcehut.python


I have zsh installed and it's not doing this. How does one get it to do this?


Are you using flakes? AFAIK `command-not-found` does not work with them. See https://github.com/NixOS/nixpkgs/issues/171054 and https://discourse.nixos.org/t/why-isnt-there-an-official-bui...

`nix-index` is a flake-compatible alternative: https://github.com/bennofs/nix-index


I am using flakes, and now I know why `command-not-found` doesn't work, thank you.


You can make it work again! It's a one-liner in configuration.nix. Solutions and alternatives were covered in detail in a recent Discourse thread: https://discourse.nixos.org/t/which-package-provides-ifconfi...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: