Is there any reason to switch if homebrew worked perfectly for me in the last couple of years?
Nix as OS X Package Manager
81–90 of 209 posts
Re: Nix as OS X Package Manager
#82This sounds exactly like what homebrew does. It also installs under /usr/local and does not touch anything else. What does nix package manager provide that homebrew does not? (from a user point of view)
Re: Nix as OS X Package Manager
#83Earlier quoted context omitted.
I did this too until there was a glibc vulnerability. and it took ages for a 'patch' to come out that had to be installed in an obscure way. For a toy project this is not a problem of course. But before I'd use nixos in production, it needs a better story for security patches. If you try to look up the word 'security' you get viagra spam on their wiki. and there is no security mailinglist whatsoever iirc. I'm sure th…
In Guix, we address this problem with grafting. Rather than rebuild everything that depends on the fixed glibc, we build the fixed glibc, then rewrite all references to the old glibc to refer to the new one. That rewriting happens in new copies of the referring packages, of course, since the "store" is immutable. https://www.gnu.org/software/guix/manual/html_node/Security-... https://savannah.gnu.org/forum/forum.php?…
Re: Nix as OS X Package Manager
#84Why use nix when pkg-src has been available on Darwin for over 15 years, boasts more packages, and has decades of support (plus Jonathan Perkin and the guys over at Joyent)? Why people assume the gross project known as homebrew (and the better macports, where homebrew gets all of their real package patches) are the only two package managers on OS X/Darwin is perplexing to me... Not to say nix is not interesting, but…
Re: Nix as OS X Package Manager
#85Earlier quoted context omitted.
> I wouldn't have known how to reproduce that "working state". So what? You don't need to reproduce that working state: The work has already been done! Think about how the interactive approach Lisp and Smalltalk programmers use is superior to the compile/run/rerun approach used by C++ and Java programmers -- by exploring the problem in a nonlinear way, you can find your way to a solution more quickly. Docker package…
How do you recommend applying security updates to the image, short of running (for example) `apt-get dist-upgrade`? What if that breaks? Do you just continue with the out-of-date image?
Re: Nix as OS X Package Manager
#86This sounds exactly like what homebrew does. It also installs under /usr/local and does not touch anything else. What does nix package manager provide that homebrew does not? (from a user point of view)
Nix groups all of your installed packages in one environment. When you install a new package, it creates a new environment with the new package added to it. This alone may sound insignificant, but it enables having multiple nix environments (e.g. one per project) and switching between them very quickly and easily.
Re: Nix as OS X Package Manager
#87> curl https://nixos.org/nix/install | sh Stop doing this. Look, even if you are rolling your eyes and thinking, "it's https and I'm not Ed Snowden, I think I can afford the risk for the benefit of an easy install process", what happens if curl is interrupted? Are you excited at the prospect of a half-ran install script that you didn't even look at?
Absolutely nothing. The script is written intelligently, so an interrupted download just results in a syntax error. Specifically, the entire file is wrapped in {}, and if the terminating } is missing, sh will throw an "unexpected end of file" error instead of executing anything.
Re: Nix as OS X Package Manager
#88Earlier quoted context omitted.
No [1]. If you are installing software from scratch, you must trust the https server that serves it to you. They could publish sha256 check sums to https://nixos.org/hashes , but you would have to trust the https server. They could publish their gpg key to https://nixos.org/gpg , but you would have to trust the https server. Things would be better if we had a reasonable certificate system for verifying open source so…
> If you are installing software from scratch, you must trust the https server that serves it to you This is incorrect - you are forced by `curl | sh` to trust all of the 1000+ CAs in your OS' keystore. And if you can't trust all of them (since some have given out Google certs before, you can't), how can you trust what you're getting over HTTPS? With hashes, they are not typically served from the same domain. That's…
If you don't trust them, they should not be in your certificate store. That's not a problem with using `curl | sh`, it's a problem with the certificate store and what the user is trusting.
Re: Nix as OS X Package Manager
#89Earlier quoted context omitted.
Nix groups all of your installed packages in one environment. When you install a new package, it creates a new environment with the new package added to it. This alone may sound insignificant, but it enables having multiple nix environments (e.g. one per project) and switching between them very quickly and easily.
Can you give me an example of projects which require this setup? (Even a personal anecdote will do)
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.) So if nix truly offers seamless switching between environments (and if it can do it quickly and efficiently), it would definitely be worth it for me to look into it further.
Re: Nix as OS X Package Manager
#90Earlier quoted context omitted.
Nix groups all of your installed packages in one environment. When you install a new package, it creates a new environment with the new package added to it. This alone may sound insignificant, but it enables having multiple nix environments (e.g. one per project) and switching between them very quickly and easily.
Can you give me an example of projects which require this setup? (Even a personal anecdote will do)
> 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.)
I don't think this is what Nix offers. This is more like a homebrew competitor (I assume you don't use homebrew to install php...).