Hey all
Have recently got into using Nix for my dev environments and wanted an easy way to wrap nimble projects https://github.com/ire4ever1190/mkNimbleApp . Still work in progress, but have used it to successfully wrap a few projects (e.g. my LS https://github.com/ire4ever1190/nimsight/blob/master/flake.nix)
Main difference compared to the one in nixpkgs is that this doesn't require a special lock file, the nimble one is sufficient to ensure the same packages are returned.
Feel free to leave any critiques here or as an issue =)
Happy to see more folks using nix and nim!
If you are interested in upstreaming something to nixpkgs as any point and want to reuse your existing nimble.lock file then you can convert from nimble.lock to the lock.json using the tiny tool I wrote, nnl.
I also wrote a nix flake for building applications using nimble or atlas here, I think the key difference from your approach is I essentially modified the nixpkgs builder and still rely on nim_builder, but use nimble and atlas in a FOD to setup the dependencies.
One feature I've thought about adding is a devShell that includes the dependencies. So that with nix develop (or using nix-direnv) one could get a dev environment with access to the necessary modules, independent of nimble or atlas. Probably by wrapping nim with nim --path:/nix/store/<hash>-deps/nimbledeps.... $@