Closed t56k closed 5 months ago
Most definitely. I'm unfamiliar with Nix myself though.
I've made a flake here that builds on NixOS nicely--happy to run some tests on macOS too (and/or submit a PR).
Sweet, saw the PR, will have a look at it when I can.
I suppose I need an account somewhere to publish it? How does it work?
If anyone else into nix reads this, I'd appreciate if you had a look at the PR too :)
You just need to publish the flake.nix
on the root of the repo, so no extra accounts are needed. But I think flakes are best paired with a binary cache, so that end users don't have to locally build the program.
A popular option for this is Cachix. It's free for open-source projects, but you do need to register an account. There's this tutorial on setting up a GitHub CI for it. There's also this workflow from Helix for reference. For the workflow to work, you need to store the CACHIX_AUTH_TOKEN
secret you get after registering your project on Cachix.
I could make a separate PR for it, if it can't just be added to the one above. But really, you can just copy-paste Helix's workflow above and %s/helix/gitu
(or the name you registered on Cachix).
@musjj thanks for the input, I'll give it a shot when this is merged
I already started maintaining the upstream package in nixpkgs
a flake could still be useful for local development however
I guess another advantage of flakes is less delay between commit to package available
Nice! I take it the caching is less of an issue when developing locally
Nice! I take it the caching is less of an issue when developing locally
The flake will cache dependencies locally--and build from master
on update instead of waiting for nixpkgs. Both have their advantages.
Keep in mind that my flake hasn't been tested on macOS yet, aiming to get that done shortly--unless someone just wants to run some tests and/or probably just add darwin.apple_sdk.frameworks.Security
to the darwin-only buildInputs
.
Nice! I take it the caching is less of an issue when developing locally
The flake will cache dependencies locally--and build from
master
on update instead of waiting for nixpkgs. Both have their advantages.Keep in mind that my flake hasn't been tested on macOS yet, aiming to get that done shortly--unless someone just wants to run some tests and/or probably just add
darwin.apple_sdk.frameworks.Security
to the darwin-onlybuildInputs
.
Updated with Security
and libiconv
to build on macOS.
Any interest in packaging this in a Nix flake and/or package? It would make it much easier than toolchaining Rust.