by rhn_mk1 · 9y ago · 0 comments
I set out with the goal of building a development environment for a software I was working on. I thought - Nix sounds like a better Docker, where it's possible to choose package versions independently of the rest of the system. It's perfect for testing!
I found the package description language refreshing - it was powerful without getting too complicated. Over the course of a couple of days I was able to adapt a few packages and create my own too, with the build environment.
It was almost finished, but the last problem remained: installing CUDA and the userspace portion of the Nvidia driver. It's not rocket science – I thought – all I need is a few .so's, it even works with Docker.
Alas, after battling Nix for another couple of days, trying to use generic GL, installing the Nvidia one, ignoring it altogether or trying to using the host version - I gave up. I found no way to build a package linked against OpenGL that would actually work.
Despite that, I hope to use Nix with a different project in the future.
* https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-30...
https://github.com/pauldotknopf/darch
It is essentially Docker, but you can boot bare-metal with it. It even uses Docker under the hood.
Every boot is a fresh boot. You can read-write during boot, but all changes are made to ram. You mount with fstab things you want persisted, like home.
It uses very simply primitives, which makes it easy to use. Squashfs/grub-mkconfig/overlayfs/etc. Docker isn't exactly a "primitive", but it is easily reasoned with.
I agree that Nix is hard to deal with when it comes to binary distributions of any kind, which includes CUDA.
That's really interesting to me. Why is a binary package not considered a source package where "compiling" it is a no-op?
A source package using autoconf will, in general, just work. A binary package always needs extra work.