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

Improve/fix Leiningen usage #145

Closed JohnnyJayJay closed 2 weeks ago

JohnnyJayJay commented 2 weeks ago

This PR changes/fixes 3 small things that improve the usage of clj-nix for Leiningen users:

JohnnyJayJay commented 2 weeks ago

I want to run a couple of tests before merging

Yeah this currently isn't tested well. I'm also throwing it at my use case right now.

Edit: The --lein-profiles option doesn't seem to be working yet. Not sure why that is though

jlesquembre commented 2 weeks ago

@JohnnyJayJay I'm not familiar with Leiningen, I didn't test the --lein-profiles, but for my primary use case (building babashka) works as expected. Let me know if you want to investigate the issue further. Otherwise, I suggest removing the --lein-profiles option and merge the other commits.

JohnnyJayJay commented 2 weeks ago

@JohnnyJayJay I'm not familiar with Leiningen, I didn't test the --lein-profiles, but for my primary use case (building babashka) works as expected. Let me know if you want to investigate the issue further. Otherwise, I suggest removing the --lein-profiles option and merge the other commits.

I definitely want to investigate further. Something very strange is happening with the with-profiles thing in general that breaks my builds.

JohnnyJayJay commented 2 weeks ago

Aha, I found the issue – the :user profile configuration generated by clj-nix is ignored if with-profiles is used, leading to missing dependencies. Fixing it by always adding the user profile.

JohnnyJayJay commented 2 weeks ago

It's good to be merged from my side now.

jlesquembre commented 2 weeks ago

Thanks!