Hi, On Mon, Mar 25, 2013 at 6:36 AM, Eelco Dolstra <[email protected]> wrote: > NixOS now provides Ubuntu-style missing command suggestions. I implemented > this > a while ago, but now it's enabled by default as part of the NixOS channel. > > So if you try to run a command that isn't installed but is available in the > NixOS channel, you get a message like: > > $ pdflatex > The program ‘pdflatex’ is currently not installed. It is provided by > several packages. You can install it by typing one of the following: > nix-env -i tetex > nix-env -i texlive-core
Awesome !!! This is realy great to have such suggestion to avoid searching for packages. > And if the environment variable $NIX_AUTO_INSTALL is set, the missing command > is > installed and executed automatically: > > $ hello > The program ‘hello’ is currently not installed. It is provided by > the package ‘hello’, which I will now install for you. > installing `hello-2.8' > ... > Hello, world! Whoa, this is even better and making Nix a powerful zero-install like tool, modulo the fact that we cannot provide a path-independent channel to make useful shareable user-land nix-store. On Mon, Mar 25, 2013 at 8:25 AM, Marc Weber <[email protected]> wrote: >> And if the environment variable $NIX_AUTO_INSTALL is set, the missing >> command is >> installed and executed automatically: >> >> $ hello >> The program ‘hello’ is currently not installed. It is provided by >> the package ‘hello’, which I will now install for you. >> installing `hello-2.8' > > I'd prefer such message: > > Application hello is provided by package hello. > May I install it to your user profile by running nix-env -i hello ? > > As alternative you can install packages system wide by adding them to > /etc/nixos/configuration.nix option environment.systemPackages > > [y] to install, ctrl-c to cancel I agree with this change, and using " I " in a system message is kind of weird from my point of view. I think this is good to have a $NIX_AUTO_INSTALL being able to install any without asking. But it would be nice to suggest a system modification. $ export NIX_AUTO_INSTALL=never Does not print anything $ export NIX_AUTO_INSTALL=ask (trusted users) Application Y is provided by the following packages: X1 X2 Do you want to install X1 in your user profile? [y/n] n Do you want to install X2 in your user profile? [y/n] y $ export NIX_AUTO_INSTALL=always (trusted users, only one package) Application Y is only provided by package X. Package X will be installed into your user profile. Use Control-C to interrupt this installation. $ export NIX_AUTO_INSTALL=* (untrusted users) Application Y is provided by the following packages: Contact you system administrator to install any of the following packages: X1 X2 -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
