Live data from Hacker News

My Experience with Nix on OS X

mpscholten.de

31–40 of 60 posts

Re: My Experience with Nix on OS X

#31

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 tr…

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.

Re: My Experience with Nix on OS X

#32
post #26

Earlier quoted context omitted.

I've started looking at this. Part of the problem is that nix wants (reasonably) to do "everything itself", including (for example) bundling the OS X SDKs itself. At the moment that's broken (the 10.9 SDK is installed in 10.11, then links against some 10.11 libraries, which is blocking mplayer). I don't have the knowledge to fix it. homebrew and fink have had the same problem (deciding when to link against system lib…

Is it possible to avoid bundling old sdk and use the one installed instead by xcode instead? Or it would require too much troubles? EDIT: completed sentence

We used to be more impure on osX, but that was also hard to maintain so a bunch of work was done over the past year.

Better CI + critical mass of maintainers (and that's just a few more) is all we need now.

Re: My Experience with Nix on OS X

#33
post #31

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 tr…

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!

Re: My Experience with Nix on OS X

#34
post #31

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 tr…

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.

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.

Re: My Experience with Nix on OS X

#35

Earlier quoted context omitted.

The correct answer for Nix is to never link against a library provided by the system. Nix provides its own bootstrap binaries and it must be done that way for the sake of reproducibility.

This is exactly what Nix does, but not all libraries are currently 'Nixified', and the ones which are aren't consistent. Apple doesn't help this -- they want you to just install xcode and the most recent SDK and nothing else.

well, there's xcode-select to chose the SDK you want which kinda implies the availability of multiple – currently for example swift 2.2 and 3.0.

I'm tempted by the "1-environment" idea but homebrew has done such an excellent job in comparison to fink/port, I';; stay loyal. Also wondering if those two projects couldn't profit from some code sharing?

Re: My Experience with Nix on OS X

#36

Earlier quoted context omitted.

This is a feature. Nix is completely isolated from the host system. It manages its own dependency tree. Using libs and other things from the host system would be both brittle and nondeterministic, negating the reason why Nix is so novel in the first place.

... except on OSX. Really I just wanted something to take the place of an Arch Linux AUR helper, the way Nix replaces Homebrew.

Ah, I can understand the concern on OSX (or other Linux distros). Earlier in the chain, you wrote "Linux desktop" -- which, to me, implied using NixOS :).

Re: My Experience with Nix on OS X

#37
post #29

Earlier quoted context omitted.

What makes Nix the future of package management? I'm not familiar with it so I don't know! I looked at the web-site and didn't find it clear what it does that Homebrew doesn't, other than being cross-platform (although I recently started using Linuxbrew which has made Homebrew cross-platform-ish for me).

The power of Nix start when you start building your own ~/.nixpkgs/default.nix (but you don't really need to if you don't want to): { packageOverrides = pkgs: with pkgs; rec { all = buildEnv { name = "all"; paths = [ vim fish gitAndTools.gitFull ]; }; }; } This is the Nix package collection. You can install this package with `nix-env -i all`. What does it do? Install vim, install fish, install git. Not much, and easi…

> It uninstall vim and install emacs.

If a package system is well designed, having the package for vim on my system shouldn't be doing any harm even if I'm not currently using it, so the system you are describing isn't really any better than just having a list of packages I want installed in a text file.

Re: My Experience with Nix on OS X

#38
post #5

I'm guessing one of the major reasons more packages are "broken" for macos is there is a CI system running for linux/nixos (travis) and not one for macos. So macos breakages can slip in easily. If a passionate mac advocate wanted to take on the responsibility of setting up & running a CI machine and hooking it up to the github PRs, I can only imagine it being a good thing...

the major reason for poor package support is low number of osx users (hydra - nix build farm - builds binaries also for osx).

Out of interest, how'd you get your OS X builds set up? I had to do quite a lot of searching before I found a company [2] willing to lend PureDarwin [1] a box for a while.

[1]: https://github.com/PureDarwin/PureDarwin

[2]: https://www.macstadium.com/ (thanks!)

Re: My Experience with Nix on OS X

#39

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 tr…

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.

Re: My Experience with Nix on OS X

#40
Nix looks cool on OSX, but trying to install something like elixir from scratch involves my macbook air compiling packages for at least 40+ minutes before I ctrl-break which is a no go.

I thought Gentoo was cool in the early 2000s when I didn't do sysadmin work for my job. I'm not waiting an hour or two to install a package anymore.

I'm sure this will improve when more precompiled packages are released for OSX when it is more popular.

Post reply on HN