[1]: https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-hom...
[1]: https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-hom...
From my few days of trying to replace Homebrew with Nix, being able to rollback the environment to last known good state (`nix-env --rollback`), ability to keep track of package changes (`nix-env --list-generations`), ability to try a package without installing it (`nix-shell`, well, technically it's installed on the machine, but nothing is linked in the profile, and you can nuke them with `nix-collect-garbage`) are very nice additions.
Apart from these features, the fact that it doesn't chown `/usr/local/` to my user is a big plus. Nix will also not linking anything not explicitly installed by user to their profile (e.g. if package A has B as dependency, B won't be linked until user actually choose to install it, which is then managed separately from B that were explicitly installed as A's dependency).
That said, I've since revert back to Homebrew because there are few packages broken that are crucial to what I'm working on. Creating and fixing package is not too hard (I did with aria2c), although time didn't allow me to do it back then. I would love to try to switch to Nix again sometimes.
People in ##nix-darwin are super-nice, also! :-)
[1]: https://github.com/NixOS/nixpkgs/pull/15029
[2]: https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell...
I can setup scripts that install and configure things for emacs to make sure it always runs in an environment that has all it needs. But with the benefit of not having to have everything installed globally.
I can have multiple versions of whatever installed into /nix at once. But still not have to worry about breaking things that need both versions.
As for package availability, I've not hit any issues. It has most of what I personally need.
What I hit more often is random breakage or having to update derivations that only ever got created or maintained from a linux perspective.
I'd say its in the "developer not afraid to fix broken build problems" category as a package manager. Its not bad, but it is really annoying when you have to revert back to a prior generation because some package you use got updated and now won't build because of its test suite failing.
Random stuff like that happens a few times a month, nothing huge though honestly.
How does it handle OS-specific dependencies/distinctions? Or if e.g. a package requires ruby or python to be installed?
With Nix you just declare postgresql as your package inputs and you are done. All needed parts to build and install psycopg2 are there.
Your package/project is completely isolated from your OS libs.
https://github.com/NixOS/nixpkgs/tree/master/pkgs
...and search here if you're looking for something in particular:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/...