hlolli / clj2nix

Convert deps.edn to a nix expression
GNU Affero General Public License v3.0
43 stars 14 forks source link

Read :extra-paths attribute from aliases #13

Open terlar opened 3 years ago

terlar commented 3 years ago

It would be nice if :extra-paths could be read and populated the extraClasspaths by default. Right now you have to manually keep those two in sync.

If I pass in extraClasspaths I would like that to be combined with the :extra-paths from the aliases. If I have multiple aliases with :extra-paths and use several of these aliases together with the clj2nix command I would also expect all of them to be added.

What do you think?

hlolli commented 3 years ago

I think it could make a good sense. I'm just wondering how this could work when releasing and when developing. Most of the time, the :extra-paths is a relative path to the project's root directory. So when releasing, would this work? I would assume these extra paths needed to be absolute paths going trough the nix store. I'm also not including the :paths values. If we were to add :paths and :extra-paths, we would be getting closer to a complete clojure runtime wrapper, which we could use to start up a clojure project. Which isn't a bad idea.