Live data from Hacker News

My Experience with Nix on OS X

mpscholten.de

41–50 of 60 posts

Re: My Experience with Nix on OS X

#41

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

My understanding is this is at least partly because of a lack of mac build machines for hydra.

Re: My Experience with Nix on OS X

#42
post #29

Earlier quoted context omitted.

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.

That is not the point I want to make. Having both Vim and Emacs doesn't really do any harm. You can even have multiple versions of Vim in the same machine, even with different and incompatible dependency version, and Nix will happily manage that. The point is that with Nix collection, it will try to build the system exactly as described without any kind of side effect.

Using Vim isn't the best example (why would someone want multiple Vim?) but the same apply to languages as well. For example if I want to use Python 3.2, but there are handful of utilities that require 3.3+. I can just install 3.2 to my profile and install those utilities with 3.5 without actually exposing 3.5 to my profile.

Re: My Experience with Nix on OS X

#43
post #31

Earlier quoted context omitted.

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

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.

Re: My Experience with Nix on OS X

#44
post #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 configurat…

> 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.

Re: My Experience with Nix on OS X

#45

Redesign of nix command line is a good thing. Nix should be more intuitive. I totally agree that nix is the future of package management.

a redesign of nix command line is on the way. so thins should get easier.

how long will this take?

Re: My Experience with Nix on OS X

#46

Nix is not great for casual Linux desktop usage - I tried installing the Atom editor, and cancelled when I saw X11 being downloaded. You might as well run NixOS in a VM.

It's hard to say what caused this without more information, but the flip side is that it demonstrates the power of Nix. Everything required to get Atom working--all the way down to something as basic as the display server--is explicitly declared in the configuration and can be downloaded and installed with one command. So although this wasn't what you intended, Nix was actually doing what it is supposed to do: acquire every necessary component (as per the specification) for your application to work.

Re: My Experience with Nix on OS X

#47
Disclaimer: Nix(OS) developer, I am biased.

It's very important for us to get such feedback. This allows us to improve and move forward.

In Nix defense I think it's not worth comparing stability yet, although that is the most important aspect for users.

What matters currently is how many smart people grasp the idea why we're fundamentally better by architecturing the language and packaging problem itself and any help we get to move us forward.

For fair comparison you should note that we have ~800 contributors, probably more than 90% are on Linux. Meanwhile Homebrew packages have almost 6000 contributors.

We have recently added 4 macs to our build farm at http://hydra.nixos.org/machines, but we desperately need more developers that care. Not 6000, just a few more.

Re: My Experience with Nix on OS X

#48
post #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 configurat…

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

Re: My Experience with Nix on OS X

#49
post #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 configurat…

> 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/

Re: My Experience with Nix on OS X

#50

Disclaimer: Nix(OS) developer, I am biased. It's very important for us to get such feedback. This allows us to improve and move forward. In Nix defense I think it's not worth comparing stability yet, although that is the most important aspect for users. What matters currently is how many smart people grasp the idea why we're fundamentally better by architecturing the language and packaging problem itself and any help…

Is there an easy overview page to see packages which are failing to build on Mac, maybe even with a link to the failing build output?
Post reply on HN