[Nix-dev] Advice for a JVM-based package

Phil Hagelberg technomancy at gmail.com
Wed Jan 11 04:09:43 CET 2012


Hey, I'm interested in getting a program I wrote into nixpkgs.

The program is Leiningen, which is the main build tool for the Clojure
programming language: https://github.com/technomancy/leiningen

My approach packaging for nix is pretty simplistic: it takes the
official shell script and applies a patch and then downloads a single
jar file that contains Leiningen along with all its JVM-level
dependencies.

I helped package Leiningen for Debian, which ended up being much more
complicated since their policy requires that each dependency of
Leiningen is packaged independently. Is my the approach I've taken
here acceptable for nix or does it need to be broken up more?

Also, I'm a bit confused about how I should declare a dependency upon
OpenJDK inside my package. I tried adding this to default.nix:

    propagatedBuildInputs = [ openjdk ];

But this caused Oracle's JDK6 to be downloaded when performing
"nix-build -A leiningen": https://refheap.com/paste/229

As it is, my package works as long as you do "nix-env -i openjdk"
first, but obviously this is not desirable. How do I depend on openjdk
without depending on Oracle's?

thanks,
Phil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-leiningen-added-package-version-1.6.2.patch
Type: text/x-diff
Size: 5306 bytes
Desc: leiningen package
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120110/1823eafc/attachment.bin 


More information about the nix-dev mailing list