[Nix-dev] nix, Maven and JAR-files

Daniel Peebles pumpkingod at gmail.com
Fri Jan 30 19:22:54 CET 2015


Charles O'Farrell and I did some initial scoping out of what it would take to have a nice Java ecosystem in nix a few months ago but the efforts died down when I caught the nix-on-Darwin bug. I plan on getting back to it when I'm done and have a lot of ideas in the space. I'm on my phone now so don't have links, but there's a nearly dead ##nix-sbt channel on freenode with some links in the topic, and interested people hang out in there if you want to discuss. 

In short, I think I agree with a lot of what you're saying and share the same goals, and we should talk on IRC at some point. 


> On Jan 30, 2015, at 12:17, Ragnar Dahlén <r.dahlen at gmail.com> wrote:
> 
> Hi, 
> 
> I've recently started using NixOS and friends and have been really impressed. I've never had this much confidence in my operating system and the installed software, and packaging new software has never been this smooth. The community has also been really helpful. Thank you!
> 
> One of my development targets at work is Clojure on the JVM and I'm contemplating ways of leveraging nix in this world. I have a vague idea of something I'd like to try, and would appreciate any feedback/suggestions/references to prior work, including "this is an awful idea don't do it". 
> 
> In short, I'd like to use nix to express dependencies on Maven packaged JARs, and make them available to my package at build or runtime. 
> 
> For those of you unfamiliar with the Java world, a JAR is typically a Java Library, and Maven is many things, but what it provides that I'd like to leverage is: 
> - a way of naming and versioning JAR files 
> - dependency resolution for JAR files 
> - repositories hosting JAR files 
> 
> Rough outline of how I see this working: 
> 
> - Provide the ability to express Maven dependencies in a derivation. Not exactly sure how this would work or look but end result could perhaps be a set like:
>     [{ groupId = "org.clojure"; artifactId = "clojure"; version = "1.7.0-alpha" } ...];
> 
> - Add some functionality for downloading JARs from maven, including transitive dependencies, and putting those JARs in nix store (the maven executable sort of knows how to do this). Maven provides sha1 checksums, maybe leverage those for verification? 
> 
> - Provide a way to to, given list of dependencies expressed as above, get the corresponding list of paths to all transitive dependencies in nix store. This can be used for example in `buildInputs` in order to construct a full classpath (':' separated list of JAR files) needed by the java runtime or compiler. 
> 
> If I had that, I think I could do some more interesting stuff.
> 
> As I said, any and all feedback appreciated. Happy to chat about this off-list on #irc (I'm ragge) if you prefer. 
> 
> Best regards, 
> Ragnar
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list