Live data from Hacker News

Nix as OS X Package Manager

ariya.ofilabs.com

1–10 of 209 posts

Re: Nix as OS X Package Manager

#3
Since I discovered Nix, I've been using it as a package manager for OS X and Linux. Every project my team is working on now has a default.nix file. Getting started on a project is so easy for a new hire now: just one `nix-env` away from a fully working dev environment! :D

Re: Nix as OS X Package Manager

#4
Anyone who's used Nix for a while -- how does package availability compare to Homebrew or Macports? Other than the default.nix thing (which Homebrew also has a version of [1]) are there any other clear benefits to switching from Homebrew?

[1]: https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-hom...

Re: Nix as OS X Package Manager

#5
> curl https://nixos.org/nix/install | sh

Stop doing this.

Look, even if you are rolling your eyes and thinking, "it's https and I'm not Ed Snowden, I think I can afford the risk for the benefit of an easy install process", what happens if curl is interrupted? Are you excited at the prospect of a half-ran install script that you didn't even look at?

Re: Nix as OS X Package Manager

#6
I was forcefully relocated from my comfortable decade-old Debian home into OS X, and the package management here in unsatisfying.

I'm looking forward to future posts that show how Nix is better than Homebrew or MacPorts, because that hasn't been demonstrated so far.

And as a bikeshed nitpick, I was always unhappy with the meaningless rpm options, preferring apt's clearer options (rpm -qa vs aptitude search). I'm a bit disappointed that nix chose to mimic rpm's style. Oh well, tomayto/tomahto.

Re: Nix as OS X Package Manager

#7

Anyone who's used Nix for a while -- how does package availability compare to Homebrew or Macports? Other than the default.nix thing (which Homebrew also has a version of [1]) are there any other clear benefits to switching from Homebrew? [1]: https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-hom...

For me the biggest benefit is reproducibility. I can get a package to build on any machine exactly the same and with no hidden dependencies.

Re: Nix as OS X Package Manager

#8

> curl https://nixos.org/nix/install | sh Stop doing this. Look, even if you are rolling your eyes and thinking, "it's https and I'm not Ed Snowden, I think I can afford the risk for the benefit of an easy install process", what happens if curl is interrupted? Are you excited at the prospect of a half-ran install script that you didn't even look at?

Yes. I'm unconfortable doing this as well. Not only with Nix, I really think you shouldn't do it, ever. On Ubuntu/Debian, at least, I'm installing the .deb package.

Re: Nix as OS X Package Manager

#9
post #7

Anyone who's used Nix for a while -- how does package availability compare to Homebrew or Macports? Other than the default.nix thing (which Homebrew also has a version of [1]) are there any other clear benefits to switching from Homebrew? [1]: https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-hom...

For me the biggest benefit is reproducibility. I can get a package to build on any machine exactly the same and with no hidden dependencies.

That does seem pretty cool, and I also see it works out-of-the-box on Linux machines. It doesn't seem to have a homebrew-cask equivalent though, which is a bit of a bummer. (Makes sense though since GUI applications aren't really cross-platform.)

How does it handle OS-specific dependencies/distinctions? Or if e.g. a package requires ruby or python to be installed?

Re: Nix as OS X Package Manager

#10
I recently set up a new server for a toy project with nixos and it was a pleasurable experience, even if I did have to pull together several sources of somewhat thin documentation. Recommended. Next time I set up a new dev machine I'm going to give nix a try for dev environment management.

Using nixops to push a closure from your local system up to ec2 is very pleasing. It feels like the future.

Post reply on HN