It’s been a year of me successfully using nixify
library:
I’ve built to manage CI for various open and closed source production-grade Rust projects and I decided to share it here in case someone would benefit from the work I have already done. I’ve also used it to manage pure Nix flakes and multi-language projects.
This library is optimized for usage in CI pipelines (but is useful outside of them as well) and minimizing the duplication and boilerplate across projects.
For example, in Rust a flake like this:
{
inputs.nixify.url = github:rvolosatovs/nixify;
outputs = {nixify, ...}:
nixify.lib.rust.mkFlake {
src = ./.;
};
}
Would expose Nix-based cargo clippy
, cargo fmt
, cargo nextest
, cargo audit
and lots of cross-compilation targets, some I’m particularly proud of are (from x86_64-linux
):
aarch64-apple-darwin
x86_64-apple-darwin
aarch64-linux-android
wasm32-unknown-unknown
For now it’s really focused on Rust, but I would love and am planning to add support for other languages as well.
In Rust land it’s really just a wrapper around the brilliant
, so whenever features land there, they are picked up in nixify
as well.
As an example success story, I’ve just recently switched a cross-based build in a repo to nixify and some target builds went from taking 3-4 hours to 10-15 minutes for a full rebuild (not to mention the caching, which makes dramatic difference in the general case)
So please let me know what you think and if anyone would be interested to contribute to this project. There are a few examples in the README and the full (hopefully) Rust cross-compilation matrix, but the docs definitely need some love.
I’ve also gave a (first time ever) talk at FOSDEM '23 where I explained some of the reasoning behind this project if you are interested