Live data from Hacker News

Pkgx – “Run anything” from the creator of brew

pkgx.sh

21–30 of 71 posts

Re: Pkgx – “Run anything” from the creator of brew

#21
post #12

Earlier quoted context omitted.

Because I don't want to learn another complex DSL just to install some packages. Whether Nix is the promised land or not, Brew works just fine 99% of the time and I have stuff to do.

Me, too, and also I already have a bunch of brew packages which I know are well maintained. So, switch to using both? Uninstall brew packages and install nix versions, verifying they are all maintained over there? Sorry, no.

Nix Darwin supports brew, so this isn't really a reasonable argument.

> So, switch to using both?

This is an option, yes. Plus, it has the added benefit of you not needing to manage `brew doctor`, `brew cleanup`, etc. yourself. So you're not stuck with weird packages you installed once, never needed again, and forgot to clean up.

It's strange that people are so against declarative systems, or even file-based OS configuration. When I get my new Macbook I was up-and-running within a few minutes. I can't imagine maintaining a list of brews I need to re-install just to set up everything + my configs + everything else. Nix Darwin just made this so ridiculously easy.

Plus I can share almost all of my configuration with my Linux setups so I have a near-consistent environment whether I'm on Mac or Linux.

The overhead of remembering the names for Brew, Apt, Snap, or whatever package managers exist seems like a lot of overhead, and I just value declarative, reproducible systems. Managing my packages on the fly?

Sorry, no.

Re: Pkgx – “Run anything” from the creator of brew

#22
post #15
post #5

I know I'm a Nix elitist but I really don't understand why people don't just use Nix for all their package management.

Bevause nix is complex. I don't want a complex system, I want a simple system.

Nix is complex (I suppose), but I would argue once you've gotten past the learning curve, it's much simpler to orchestrate with. Determinate systems are far simpler to manage/debug.

Re: Pkgx – “Run anything” from the creator of brew

#25
post #13
post #7

Earlier quoted context omitted.

Probably the EVE Online-like learning curve.

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

#27
post #13
post #7

Earlier quoted context omitted.

Probably the EVE Online-like learning curve.

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

I must have terrible luck. I try this and it tells me one of the dependencies is "marked as broken" (and forcing it to install anyway doesn't work) so I instead end up digging through GitHub trying to track down the cause.

Re: Pkgx – “Run anything” from the creator of brew

#29
post #21

Earlier quoted context omitted.

Me, too, and also I already have a bunch of brew packages which I know are well maintained. So, switch to using both? Uninstall brew packages and install nix versions, verifying they are all maintained over there? Sorry, no.

Nix Darwin supports brew, so this isn't really a reasonable argument. > So, switch to using both? This is an option, yes. Plus, it has the added benefit of you not needing to manage `brew doctor`, `brew cleanup`, etc. yourself. So you're not stuck with weird packages you installed once , never needed again, and forgot to clean up. It's strange that people are so against declarative systems, or even file-based OS conf…

> It's strange that people are so against declarative systems, or even file-based OS configuration. When I get my new Macbook I was up-and-running within a few minutes. I can't imagine maintaining a list of brews I need to re-install just to set up everything + my configs + everything else.

I haven’t had time to try Nix yet, but HomeBrew does have a declarative-ish workflow that I’ve been using for years:

Brew Bundle [1] lets you have a plaintext file listing all packages you want installed on your system. Add a line for stuff you want installed, delete a line for stuff you want removed, invoke it the right way and it will install/remove packages until your system matches the list. The initial list can be generated by “brew bundle dump” or something like that.

For configuration, I find that a normal dotfile repo cloned into my ~/.config (with a script that maintains symlinks to config files in e.g. ~/Library) works well enough for my use.

[1]: https://github.com/Homebrew/homebrew-bundle

Re: Pkgx – “Run anything” from the creator of brew

#30
post #12

Earlier quoted context omitted.

Because I don't want to learn another complex DSL just to install some packages. Whether Nix is the promised land or not, Brew works just fine 99% of the time and I have stuff to do.

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?
Post reply on HN