Live data from Hacker News

Nix as OS X Package Manager

ariya.ofilabs.com

141–150 of 209 posts

Re: Nix as OS X Package Manager

#141

Earlier quoted context omitted.

"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." Homebrew is downright dangerous (I've written about why: http://inthebox.webmin.com/homebrew-package-installation-for... ). MacPorts is fine. Not wonderful, but OK. Not reproducible in the way Nix is. PkgSrc is also pretty good. Also not reproducible the way Nix is. But, the packa…

Homebrew is not dangerous. Please don't spread FUD. Your link specifically covers the case of Homebrew on the server . But Homebrew isn't meant to be a server package manager. It's an OS X package manager, and OS X is a desktop operating system, not something that most people choose to use as a server (OS X Server exists but is primarily used for intranet stuff rather than as a production server). The complaints that…

I had no trouble finding people talking about using it on servers during my research. I even found people wanting it and discussing porting it for use on Linux (which is among the most ridiculous suggestions I can imagine, since Linux has an embarrassment of riches in terms of good and great package management options).

So, yes, to be clear: The dangers of Homebrew are primarily when considering it for use in a server context. I personally wouldn't use it anywhere. But, it has many good qualities that many people value highly.

Re: Nix as OS X Package Manager

#142

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

I heard the hype. Figured I would give it a try. Installed emacs with nix Install spacemacs on top of new emacs. Throws odd errors. Uninstall emacs with nix Install emacs with brew Install spacemacs on top of emacs It works! To pull users from brew it needs to work at least as well, especially for common tools like emacs. Go check out the number of issues related just to emacs installs, it is kind of amazing.

Spacemacs is pretty complex with its own updating logic too. We really want to package it but I don't think anybody had gotten around to it then.

Just about everything else I'd like to use is packaged, so Id like to think we're over the adoption-pkg-count chicken egg problem.

Re: Nix as OS X Package Manager

#143
post #86

Earlier quoted context omitted.

Can you give me an example of projects which require this setup? (Even a personal anecdote will do)

I've never heard of nix, so I can't comment to that specifically. But being able to have multiple / separated environments on my machine would be hugely beneficial. Working for a full-time software consulting agency, I'm normally actively working on many projects at the same time, each of which have their own nuances of packages that are required (e.g. different versions of PHP, different sets of dependencies, etc.)…

It utterly does!

Re: Nix as OS X Package Manager

#144

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

Try pkgsrc. It's much more like apt than nix, macports, or homebrew.

pkgsrc is great and I prefer it to Homebrew on Mac OS X, but it only updates quarterly. :(

Re: Nix as OS X Package Manager

#145
post #129

It seems like when installing Nix, it needs to create a 'nix' directory in your root directory. While I haven’t tried installing Nix yet myself, I’m guessing this probably won’t work on OS X v10.11 El Capitan due to System Integrity Protection¹. You’ll have to temporarily turn it off² first before attempting to install Nix (and then optionally turn it back on after). ―――――― ¹ — https://derflounder.wordpress.com/2015/…

I have SIP enabled and I was able to install nix just by `sudo mkdir \nix` before installation. No problems.

Re: Nix as OS X Package Manager

#146
post #129

It seems like when installing Nix, it needs to create a 'nix' directory in your root directory. While I haven’t tried installing Nix yet myself, I’m guessing this probably won’t work on OS X v10.11 El Capitan due to System Integrity Protection¹. You’ll have to temporarily turn it off² first before attempting to install Nix (and then optionally turn it back on after). ―――――― ¹ — https://derflounder.wordpress.com/2015/…

Ooh, that's an excellent point -- thanks for bringing it up. I've had Nix installed since early 2014, so I haven't run into any trouble with SIP yet. Looks like we might need to update our docs, and maybe have the installer give a helpful tip.

No need, `sudo mkdir /nix` works even with SIP enabled.

Re: Nix as OS X Package Manager

#147
post #129

It seems like when installing Nix, it needs to create a 'nix' directory in your root directory. While I haven’t tried installing Nix yet myself, I’m guessing this probably won’t work on OS X v10.11 El Capitan due to System Integrity Protection¹. You’ll have to temporarily turn it off² first before attempting to install Nix (and then optionally turn it back on after). ―――――― ¹ — https://derflounder.wordpress.com/2015/…

Nope, System Integrity Protection only affects you if you delete/modify system level files. It does not prevent you from creating a `/nix` directory with regular root privileges, nor does it prevent you deleting it with root privileges.

It's only when you try to delete something like /Library, that it then complains.

This is one reason why I strongly believe SIP is blown out of proportion. I've used El Capitan since the betas and created root directories, deleted them, added to existing root directories without having to disable SIP.

Again, it's only when you try to modify the built in directories inside / does it then complain, and frankly, I am more than happy with that, even with sudo privileges.

Re: Nix as OS X Package Manager

#148
post #129

It seems like when installing Nix, it needs to create a 'nix' directory in your root directory. While I haven’t tried installing Nix yet myself, I’m guessing this probably won’t work on OS X v10.11 El Capitan due to System Integrity Protection¹. You’ll have to temporarily turn it off² first before attempting to install Nix (and then optionally turn it back on after). ―――――― ¹ — https://derflounder.wordpress.com/2015/…

Ooh, that's an excellent point -- thanks for bringing it up. I've had Nix installed since early 2014, so I haven't run into any trouble with SIP yet. Looks like we might need to update our docs, and maybe have the installer give a helpful tip.

Unless /nix modifies files/folders, then no, you don't need to modify your install instructions.

SIP only prevents users from modifying system level files. It does not prevent you from adding to, or deleting your own files within the `/` directory.

Re: Nix as OS X Package Manager

#149
post #144

Earlier quoted context omitted.

Try pkgsrc. It's much more like apt than nix, macports, or homebrew.

pkgsrc is great and I prefer it to Homebrew on Mac OS X, but it only updates quarterly. :(

Not true any longer, at least for the binary packages I produce[0]. I switched them over to trunk-based builds a while ago, which are updated every few days.

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

Re: Nix as OS X Package Manager

#150
post #104

Earlier quoted context omitted.

You're not wrong, but Docker comes at it from a different angle; Docker expects you to be handing around tagged images, to solve a similar set (but not the same set!) of problems that reproducible builds solve. Ideally, I want _both_ of them: tagged Docker images being sent between environments (with `docker run -e SOME_ENV=testing imagename` for changing the internal config), but reproducible builds in my Dockerfile…

Yes, you can do this. There is a utility "nix-docker" that will convert a Nix configuration file into a BusyBox Docker image (see e.g. http://zef.me/blog/6049/nix-docker )

Oh brilliant! Thanks for that, definitely going to give that a shot :)
Post reply on HN