Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nix is a distro that admits defeat against dependency management and entirely gives up on the idea of having system libraries. Instead every application you want to run has to have all of it's dependencies explicitly stated and provided custom in nix style configs for each program. Usually this means someone else has done all this packaging work for you. They hate it when people call it containerization but it's effectively taking containerization to the extreme for every single bit of software on your system with no ability to not use containers.

But if, say, you want to compile a random C program you found on the web then it is up to your to now set up the build environment and provide all the libraries and deps to be able to compile and then run the program. Just running make or ./configure or cmake . isn't going to do it because those configuration setups won't have a system lib environment to check against. It seems like a really weird distro to chose as your desktop but makes fine sense in commercial enterprises we're you're going to re-build the world for all your software anyway.



> They hate it when people call it containerization but it's effectively taking containerization to the extreme for every single bit of software on your system with no ability to not use containers.

It's not containerization - containerization means something very specific (user namespaces + chroot). It may attack some of the same problems, but it is not a container.

The sandbox that nix builds run within is more or less a container, however.


I think you're thinking of NixOS, which is a distro based on Nix. Nix itself is not a distro.

Ironically, this further emphasizes how confusing the project is (projects are?).


Well, sure, but setting up the build environment is pretty easy! You just specify the libraries as you normally would, and it works. The only difference is that those libraries are only available to that package, and not globally. The function `stdenv.mkDerivation` will actually build a standard ./configure && make style C project for you if you provide it some package source, you just have to copy out the build artifacts (with something like (cp project bin/project) and specify a list of libraries needed at build/runtime.

Agree that the documentation for all of this could be a lot better and more discoverable. It's good once you get over the initial hump though.


This is the opposite of "pretty easy". (Apologies if I'm just failing to detect sarcasm.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: