News for hackers. Stuff that matters.
Re:What Is Nix? by inetknght on Wednesday May 20, 2020 @08:46PM (#23253722)
So... statically compiled executables?

Wasn't that tried long ago and it was determined that the user should be able to choose when to upgrade dependencies, such as if a dependency needs an out-of-band update to work on the localhost OS?

Re:What Is Nix? by smilliken on Thursday May 21, 2020 @12:28AM (#23254800)
Your criticism misses the mark because nix users have the ability to update a dependency and rebuild all of the dependees. With nix, I can update openssl in one place and be sure that everything that depends on it gets re-evaluated. How can I be confident that everything is linking the patched openssl I want when I'm using aptitude, pip, npm, docker, etc?
Re:What Is Nix? by ComodoHacker on Thursday May 21, 2020 @04:18AM (#23256007)
But what if they're using different versions of OpenSSL?
Re:What Is Nix? by ris on Thursday May 21, 2020 @05:31AM (#23256444)
It'll only rebuild the packages that depended on that particular openssl. This is an area where Nix shines, because all packages are explicitly bound to their dependencies, it means it's no longer relevant what one file happens to be occupying `/usr/lib/libssl.so`, or even `/lib/x86_64-linux-gnu/libc.so.6`, so you can be running different apps that rely on totally different glibc versions alongside each other with no problems.
Re:What Is Nix? by ComodoHacker on Thursday May 21, 2020 @07:11AM (#23257003)
I mean if there's a bug, it's not enough to patch one particular OpenSSL. You have to audit manually, so Nix won't make much of a difference.
Re:What Is Nix? by takeda on Thursday May 21, 2020 @11:50AM (#23259904)
Well, by default it uses the same library everywhere, but it gives you an option that you can have two apps that rely on e.g. different version of openssl. If you do that it is on you to make sure both dependencies are updated. There is a bit of benefit as well. For example instead of creating a new derivation, you can override existing one (kind of like you extend a class in OO) if for example you make another version of openssl based off the existing one, but maybe changed compile flags, then nix will be smart enough to recompile both.
Re:What Is Nix? by bb010g on Friday May 22, 2020 @02:51PM (#23275542)
Except the auditing doesn't have to be manual: https://github.com/flyingcircusio/vulnix
Re:What Is Nix? by zerd on Thursday May 21, 2020 @01:08PM (#23261221)
Oh, that sounds like it could solve my issue. E.g. I compiled my program against my glibc which is 2.24, but target was running 2.23. I didn't even use any "new" 2.24 features, but it was missing a symbol, so it wouldn't run. But then to compile against 2.23 locally, I had to get an older version of GCC (not sure why, but), and everything needed to build the older GCC, and so on. But then I got some old versions of libraries on my system, so I had to delete them. I ended up compiling it all inside a docker container because I didn't want to pollute my env with older versions.
Re:What Is Nix? by renox on Friday May 22, 2020 @04:51PM (#23276839)
Maybe but don't underestimate the effort, I needed to do something similar and tried to use Nix but I failed: the doc wasn't very good, there weren't 32bit packages..

So I just built gcc myself which I found very easy.

Re:What Is Nix? by ex_amazon_sde on Thursday May 21, 2020 @08:22AM (#23257539)
Good point: statically compiled binaries are a big problem for security updates.

This applies to Linux distributions as well as large organizations that have their internal distribution (like Amazon).

Re:What Is Nix? by ben0x539 on Thursday May 21, 2020 @12:22AM (#23254770)
The user should use nix to do that.