Some time ago, Brian Hicks stepped down from maintaining nix-script, a tool for running (possibly compiled) scripts with dependencies. See also
The big advantage of nix-script
is that it hashes the input script and so remembers the Nix derivation as well as the Nix derivation result. Thereby, nix-script
speeds up the compilation process until script execution by several orders of magnitude.
For the last months, I have maintained a fork of nix-script. However, my Rust is a bit rusty, and nix-script
is a complex project. Maybe a bit more complex than it needs to be. I tried building a simpler (but also less feature-rich) alternative in Haskell: Magix.
- Magix is simple and stupid.
- Magix is a tiny wrapper around
nix-build
. - Magix is heavily tested (only unit tests at the moment, but please drop a PR).
- Magix uses Nix expression templates, and so, is easier to understand, modify, and enhance.
I have been using Magix for over a month now, and have not had a single issue. It is fast, and extremely easy to use, so if you like, have a look, try it out, and suggest an improvement (or add support for your language of choice)!
Finally, I wanted to thank Brian Hicks for his work on nix-script
. It has been a great tool that I have been using for years!