jlesquembre / clj-nix

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

Include/exclude deps.edn in patchPhase #78

Closed Sohalt closed 1 year ago

Sohalt commented 1 year ago

While it's already possible to include/exclude some deps.edn files in lockfile generation (using --deps-include and --deps-exclude), the patch-git-sha command during patchPhase tries to patch all deps.edn files. It would be nice to be able to granularly specify which files to patch (or record which files where included/excluded in the lockfile and have the patch phase automatically pick that up).

jlesquembre commented 1 year ago

Good catch. I think in that case makes more sense to simple ignore those dependencies.

patch-git-sha should expand only the shas in the lock file, ignoring the others (instead of failing). Makes sense? I don't think we need to save the included/excluded files in the lock file.

Sohalt commented 1 year ago

We should be able to deal with files called deps.edn that are not valid edn.

jlesquembre commented 1 year ago

What's the use case to deal with deps.edn files that aren't valid edn?

On Wed, Aug 9, 2023, 09:12 Sohalt @.***> wrote:

We should be able to deal with files called deps.edn that are not valid edn.

— Reply to this email directly, view it on GitHub https://github.com/jlesquembre/clj-nix/issues/78#issuecomment-1670794243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICNSAY5IACCGJYEW5GAULXUMZ7FANCNFSM6AAAAAA3G3ER5A . You are receiving this because you were assigned.Message ID: @.***>

Sohalt commented 1 year ago

I have a deps.edn with {{}} placeholders for use with deps-new templating.

jlesquembre commented 1 year ago

@Sohalt could you try #80?

jlesquembre commented 1 year ago

@Sohalt I merged #80, but feel free to reopen if something doesn't work as expected.

Sohalt commented 1 year ago

Thank you! And sorry for not getting back on this earlier. I just tried it and it works as expected!

jlesquembre commented 1 year ago

@Sohalt no worries, thanks for testing it!