Comment by alxmng
Did you consider writing a nicer language that compiles to Nix? A "friendly" tool on the outside with Nix inside.
Did you consider writing a nicer language that compiles to Nix? A "friendly" tool on the outside with Nix inside.
I don't think nix is that awful, while there are some tasks that are more difficult or can be a little bit verbose (if you want to play a lot with the attribute sets / lists or string manip) When using nix most of the time you'll end up just writing bash or using it as a templating language.
Yup, that was how I built the prototype: https://www.zombiezen.com/blog/2024/06/zb-build-system-proto...
The last commit using that approach was https://github.com/256lights/zb/tree/558c6f52b7ef915428c9af9... if you want to try it out. And actually, I haven't touched the Lua frontend much since I swapped out the backend: the .drv files it writes are the same.
The motivation behind replacing the backend was content-addressibility and Windows support, which have been slow to be adopted in Nix core.