Earlier quoted context omitted.
Do you have a link to where I can read about using Nix as purely a package manager? Or a minimal example showing how a Nix config looks if used in this manner?
Julia Evans has an article pretty much about what you’re asking for! I think looking at nix-shell for getting some things into PATH temporarily would also be quite useful, although Julia deliberately left it out of the article. It’s just as simple as running `nix-shell -p pkg1 pkg2` if that’s all you want to do with it! https://jvns.ca/blog/2023/02/28/some-notes-on-using-nix/
Pkgx – “Run anything” from the creator of brew
61–70 of 71 posts
Re: Pkgx – “Run anything” from the creator of brew
#62If Max added “offline caching” to pkgx, you could still continue to use utilities even after the shell session ended or if you lost Internet connectivity!
/s
Re: Pkgx – “Run anything” from the creator of brew
#63Earlier quoted context omitted.
“Minutes” seems an awfully small rebuttal to be quite honest. I’ve never had to install a brew package under duress.
When I issue a `brew install package` command, I expect it to either install the package or fail installing the package, and not do something else entirely. Sometimes I need to do something quick, nix-shell has never given me any issues with that. Brew has taken 10 minutes before getting to the install process. It's severely annoying.
Re: Pkgx – “Run anything” from the creator of brew
#64Re: Pkgx – “Run anything” from the creator of brew
#65Earlier quoted context omitted.
When I issue a `brew install package` command, I expect it to either install the package or fail installing the package, and not do something else entirely. Sometimes I need to do something quick, nix-shell has never given me any issues with that. Brew has taken 10 minutes before getting to the install process. It's severely annoying.
By contrast, other package managers just don’t update thing. You end up so out of sync it becomes a massive pain.
Re: Pkgx – “Run anything” from the creator of brew
#66Earlier quoted context omitted.
The docs could be better, but it's as easy as: 1. Install Nix from https://nixos.org/download.html 2. Find the package from https://search.nixos.org/packages 3. Start a shell with `nix-shell -p `, have the package available in it
Or even better, install it using the installer from Determinate Systems.
Re: Pkgx – “Run anything” from the creator of brew
#67Re: Pkgx – “Run anything” from the creator of brew
#68Earlier quoted context omitted.
You don't need to learn the DSL to use Nix as a package manager.
Do you have a link to where I can read about using Nix as purely a package manager? Or a minimal example showing how a Nix config looks if used in this manner?
I'm not sure why you think there is any 'config' involved. Perhaps you're conflating Nix the package manager with NixOS? Nix is many things, but it's also just a package manager like any other. For example:
nix profile install nixpkgs#vim # installs a package into your environment
nix shell nixpkgs#binwalk nixpkgs#vim # drops you into a shell with the given packages
nix run nixpkgs#firefox # runs the mainProgram of the given package
A couple of things to note:The aforementioned commands are the "experimental" Nix 2.4 CLI commands that integrate with Nix Flakes. They are only experimental in name though, their status of being experimental being sort of a meme at this point. I recommend using these new commands (you can opt in by supplying a command-line flag or by tweaking the package manager config).
Packages that are not in active use (e.g. packages that you've referred to in 'nix shell' or 'nix run' invocations that are not installed using 'nix profile') are due for garbage collection. The garbage collection settings can be configured (either through NixOS, home-manager or the package manager's standalone configuration). The garbage collection can also be triggred manually. This makes experimenting with programs that you don't necessarily want to keep a joy.
The 'nixpkgs' in the aforementioned invocations is a default input that is set during installation. It refers to the nixpkgs package archive's flake's master branch's latest revision (https://github.com/nixos/nixpkgs). The available inputs are configurable (again, either through NixOS, home-manager or the package manager's standalone configuration).
Re: Pkgx – “Run anything” from the creator of brew
#69Earlier quoted context omitted.
Do you have a link to where I can read about using Nix as purely a package manager? Or a minimal example showing how a Nix config looks if used in this manner?
Sorry for the late reply! I'm not sure why you think there is any 'config' involved. Perhaps you're conflating Nix the package manager with NixOS? Nix is many things, but it's also just a package manager like any other. For example: nix profile install nixpkgs#vim # installs a package into your environment nix shell nixpkgs#binwalk nixpkgs#vim # drops you into a shell with the given packages nix run nixpkgs#firefox #…