Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I've never used Nix for OS X, but I can confirm that the UI can definitely use some work, and the proposed changed which are in the pipe look fantastic.

But, comparing Nix on the simple operations is like reviewing a sports car after only driving it in a school zone. There is so much more that Nix provides that homebrew doesn't even come close to.

Nix has made managing of my servers way easier then anything I have tried before and I have no intentions of changing away any time soon.



view as:

Which of these features would be useful on a desktop machine used for development?

I'm genuinely curious, I don't really use homebrew either since most of the stuff I need is already installed.


Cross-platform isolated development environments per project. Bye-bye Vagrant!

I haven't used Nix much on the desktop as a "user" so I'll just say some things about development.

It basically boils down to one thing: isolation.

Everything you use will be described by Nix, no system libraries or commands. The only think you rely on is the kernel of the host.

Not only is my environment almost exactly the same from development to CI to deployment but I can actually copy the program exactly as it was built between them (assuming compatible kernel and architecture). For example when I push to my master branch CI automatically runs a build, tests the code with the exact versions of the libraries it will be using in production then uploads them to a binary cache (which is essentially the nix equivalent of a package server), Now I can just install the program on my production servers and it will use the exact versions of the libraries that I tested it with with almost no reliance on the underlying system.

It's like docker but simpler and more elegant.


And NixOps makes this even more awesome: after a build it can automatically push it onto your servers. Or it can automatically set up Virtualbox VMs for each machine, if you want to set the build locally. Or AWS instances, if you have too many for it to be practical locally.

I tried Nix on OS X after a recent HN topic suggested it. I hate Homebrew with a passion (it's fine initially but, over time, it's always created a hard-to-clean-up mess for me), so I was looking for something that could replace it for most unixy things I need to install.

I immediately ran into a showstopper bug that they've had for some time now. Apparently, they've focused on NixOS and the CA certificate configuration is borked on other platforms. This means Git, Curl and anything else that tries to use the standard OS certificate store will fail certificate validation. I know it's only one issue, but it was pernicious enough for me to nuke my Nix install and move onto something else.

At the moment, the best I can find for OS X is Rudix. The selection of available software is pathetic compared to Homebrew and Nix, but a lot of the core stuff is there and it's all packaged as a .pkg, which makes it really easy to cleanly erase installed software.


> packaged as a .pkg, which makes it really easy to cleanly erase installed software.

In theory, but there's no package uninstaller and OS X installer packages are neither pure nor idempotent.

While you can remove the files installed by one, there's no straightforward or platform-provided way to undo the changes made by their (generally unknowable) install scripts.

Incidentally, Apple shipped an Xcode uninstaller; written in perl, it used lsbom and pkgutil to collect and subsequently remove the files owned by all the com.apple.dt packages complement the system-owned files or files installed by other packages.


Yes, it's not as clean as Nix when it comes to uninstall, but using piping pkgutil to rm has never gotten my machine in as borked of a state as Homebrew inevitably does. Also, many .pkg files provide an uninstall script of their own which is almost always reliable.

Did you report an issue? We might have bugs like that, but the promise of a better package manager still persist.

There's many variations of this issue open. See https://github.com/NixOS/nixpkgs/issues/3382 for an example. Most are still not closed and have been open for long enough that it doesn't seem hopeful that they'll be fixed soon.

> At the moment, the best I can find for OS X is Rudix. The selection of available software is pathetic compared to Homebrew and Nix, but a lot of the core stuff is there and it's all packaged as a .pkg, which makes it really easy to cleanly erase installed software.

Apologies for hijacking a Nix thread, but I'd love your views on our OS X binary package sets[0]. We currently ship over 14,000 pre-built signed packages, all self-contained under /opt/pkg, and easy to search/install/remove using pkgin which has a familiar feel to anyone used to apt-get/yum/etc.

The packages are continuously built from pkgsrc trunk so should be reasonably up-to-date, and we try to be responsive when users need newer versions or packages built with different options.

So far the feedback has been positive, but I'd love to see more use-cases so we can improve the experience for everybody. Thanks.

[0] https://pkgsrc.joyent.com/install-on-osx/


I wasn't aware of this, but it looks really promising. Thank you for posting this!

Legal | privacy