3 ms·
I came here to say the same. Recently I have started using Nix as a universal package manager, every project I start starts with a `shell.nix` file with a pinn
by arximboldi 9y ago
I came here to say the same. Recently I have started using Nix as a universal package manager, every project I start starts with a `shell.nix` file with a pinned <nixpkgs> commit and some line to bring in gcc or make. I always build in a nix-shell --pure to make sure I didn't miss anything. The system is so great and works so beautifully it's even hard to explain.
Nix has very sensible defaults and defining a Nix expression to install a cmake or autotools package is a breath. But even projects with just Make or no build system at are easy to install, you just need to copy the output to the /nix/store in the installPhase (to $out). And I can easily define Python or any other language dependencies in the same consistent and concise syntax. I have no fear anymore I won't be able to install dependencies in the future. Any other dev just does `nix-shell` in the project root and they are sure they are ready to go. I even used to hate the Nix syntax (as opposed to Guix) but at some point it "clicked" and now it makes a lot of sense.
Only drawback is no Windows support. Maybe someone at Microsoft could help with that? It would be so sad to have the community converging to a suboptimal solution just cuz Windows... :/
- twic 9y agoThis sounds like it could be useful for me. I've never so much as looked at Nix; if i go and read the standard documentation, will i learn how to do this? Or is it a creative application of the tools? Does Nix make it easy, or even possible, to bring in dependencies from legacy sources on the network? For example, my company has an FTP server full of carefully-packaged, versioned libraries in tarballs, and it would be great to be able to use those, rather than having to repackage everything.
- arximboldi 9y agoTo your last question: yes! In a "Nix expression" defining how you build the package (i.e. a "derivation") you can specify where the source is fetched from via any mechanism (e.g. http, ftp, git, etc.) The documentation is good but it can sometimes be a bit rough. There are some good blogposts on how to achieve specific things that you may find when searching around. Also the IRC community seems is quite active, responsive and friendly :-)