jlesquembre / clj-nix

Nix helpers for Clojure projects
https://jlesquembre.github.io/clj-nix/
Eclipse Public License 2.0
146 stars 22 forks source link

Add an overlay (take 2) #19

Closed kenranunderscore closed 2 years ago

kenranunderscore commented 2 years ago

Since I'd love to use this as an actual overlay at work, and #13 seems to be a bit stalled, with the call for someone else to do it, I figured I might just do it :)

I've added an overlay output. This also simplifies the callPackage invocations, as when called with final (where the clj-nix packages are already contained), one does not need to pass the necessary arguments like clj-builder via self; it just works.

I've also added @Sohalt as co-author, since he did the same kind of work earlier.

This is in principle ready to merge I think. I tried this in our work project and the functions I use are still working nicely. I'd love if anyone else could try it out, too, as I'm not using all the features.

One more thing, though: In more recent versions of nix the flake outputs overlay, devShell, defaultTemplate are deprecated in favor of the more uniform overlays.default, devShells.default, templates.default. @jlesquembre Would you mind me putting this in here as well, as separate commit and preserving backwards compatibility? It doesn't really fit in a separate PR, as this one changes the structure so much already.

jlesquembre commented 2 years ago

@kenranunderscore Thanks a lot! It would be great if you add the *.default, it's something I wanted to do.

I'll test it before merging, not sure if I'll be able to do it this weekend, if not, I'll do it on Monday.

kenranunderscore commented 2 years ago

Cool, I'll add those sometime this weekend. No need to hurry with any tests or merges!

kenranunderscore commented 2 years ago

Added the default stuff. I'm not really sure what benefits it has for overlays specifically, but at least it gets rid of the warning when checking the flake.

jlesquembre commented 2 years ago

Thanks @kenranunderscore