4 ms·
> No, but it does define how (and where) I will write that code. I don't follow your rationale here. e.g. many people write packages for their own "nix user r
by rgoulter 2y ago
> No, but it does define how (and where) I will write that code.
I don't follow your rationale here.
e.g. many people write packages for their own "nix user repository". https://github.com/nix-community/NUR https://github.com/nix-community/NUR or there are examples of fairly sophisticated programs which declare packages outside of nixpkgs, such as helix or llamacpp.
helix: https://github.com/helix-editor/helix/blob/master/flake.nix https://github.com/helix-editor/helix/blob/master/flake.nix
llama: https://github.com/ggerganov/llama.cpp/blob/master/flake.nix https://github.com/ggerganov/llama.cpp/blob/master/flake.nix
> yet at the same time keeps all its packages in a single monolithic source tree where none of that is allowed to be present
In a programming language, a function can be called with different arguments.
With Nix, since the packages are the result of functions, you can use these package definitions with whatever incompatibilities you like. -- I'm not sure what use case you're thinking of that Nix can't handle.
- projektfu 2y agoNix can handle it, but can the user? That's my question. It took a while for me to understand the basic organization of nixpkgs well enough to do things like reconfigure a package properly for another package. Documentation-wise, the big picture isn't well-explained and, like I said, there is no official documentation recommending the use of a GUI tool to help. I see that there are tools available, but very little uptake of them in terms of documentation. I am not sophisticated enough in Nix to say what a good roadmap would be. But I feel that if I were sophisticated enough I would be trapped in the mindset and not able to see how it could be made easier to comprehend for new users and tools. But who knows? As of now it's a very interesting puzzle and, while I take a lot longer to accomplish what I can do elsewhere, I enjoy the little aha moments along the way.
- rgoulter 2y ago> Nix can handle it, but can the user? Learning how to write Nix in order to get it to do what you want can be tough, yeah. https://www.tweag.io/blog/2024-05-02-right-words-right-place/ https://www.tweag.io/blog/2024-05-02-right-words-right-place... In this recent post discussing efforts which have been made to improve documentation, the author reckons that one of the reasons Nixpkgs is difficult to understand is that Nix's powerful expressiveness allowed different people to take different approaches to solve similar problems. (As opposed to, having to rely on a common solution). IMO.. difficulties with Nix fall into three broad categories: with Nix's idiosyncrasies, with the Nixpkgs codebase, or with the software you're trying to get Nix to run. On most OSs, you might not need to have a deep understanding of what's going on in order to fix a problem. With Nix (& NixOS), running into problems probably requires a decent grasp of what you're doing, as well as what Nix is doing, and maybe how the Nixpkgs code is doing it. > the use of a GUI tool to help I think between "easy/hard to understand" and "easy/hard to model with a GUI", GUI helps a lot with things that are easy, but not so much with things that are difficult. e.g. with VSCode, you can get a GUI to help you set options. Emacs also has a GUI to help you customize options; but you don't get a GUI that helps you write elisp. e.g. I'm not sure that efforts like https://github.com/snowfallorg/nixos-conf-editor https://github.com/snowfallorg/nixos-conf-editor (formerly "snowflake") provide much more help than what the "search nixos options" provides https://search.nixos.org/options https://search.nixos.org/options I think most of the time people run into difficulty, a GUI isn't going to help. (In the same way that people don't ask for a GUI for Terraform).