Hacker News new | past | comments | ask | show | jobs | submit login

Can I just do “nix install foo”? I looked into nix ages ago but opening a text file any time I wanted to install some random package just felt too weird.



Yes! (kind of, I wish `nix install` was a thing)

    # search for a package called `foo`
    nix search nixpkgs foo
    # install package foo, user-wide
    nix-env -i foo
The CLI UX can get better, and I'm fairly sure folks are working on it.

You can also test-drive a package without committing to it, e.g. you want to try the program `cowsay` but only want to use it once:

    nix-shell -p cowsay
    cowsay
    exit
This spawns a new shell with `cowsay` available, and after you exit it won't be cluttering your system packages.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: