guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: Add Ant.


From: Ricardo Wurmus
Subject: Re: [PATCH]: Add Ant.
Date: Mon, 9 Feb 2015 15:51:40 +0100

Ludovic Courtès writes:
>> According to the docs[1],
>>
>>     "ANT_HOME is used by the launcher script for finding the
>>      libraries. JAVA_HOME is used by the launcher for finding the
>>      JDK/JRE to use."
>>
>> So, it would indeed make sense to modify the "launcher script"
>> (whichever this is, probably "ant") to set ANT_HOME before continuing.
>> I'm not a Java person, though, so I don't know if this is considered
>> bad.
>
> I think this would be fine.

I just ran "ant" after setting JAVA_HOME but without setting ANT_HOME,
and it appeared to work just fine.  I don't really have anything to test
this with at the moment, but it seems to me that maybe ANT_HOME isn't
required after all.

>> I even wonder if we should make icedtea6 a build-time input only to
>> compile the libraries, so that one would not need to have icedtea6
>> installed at all.  Or should there be multiple variants of Java packages
>> akin to what we do with Python modules?  I must admit that I find this
>> rather confusing.  How closely do we have to tie Java applications /
>> libraries to a particular version of the JDK?  Are there any insights
>> you could share about how it's done in Nix?
>
> This commit from Nixpkgs gives some insight:
>
> commit 54d172141435d61813666ccb6dbfe8a58a9ce896
> Author: Eelco Dolstra <address@hidden>
> Date:   Fri Jan 3 13:29:06 2014 +0100
>
>     ant: Update to 1.9.3
>     
>     Also, Ant no longer has a build-time dependency on a particular JDK.
>     It finds the JDK via $JAVA_HOME or $PATH (by looking up javac).  This
>     way, we don't need to have separate packages like apacheAntOpenJDK and
>     apacheAntOracleJDK.  It also seems reasonable: after all, installing
>     GNU Make doesn't give you a C compiler either.  It does mean that
>     instead of
>     
>       buildInputs = [ ant ];
>     
>     you now need to write something like
>     
>       buildInputs = [ ant jdk ];
>
> However, the Nixpkgs does not actually build Ant; it just reuses
> pre-built binaries, which may not be what we want.

Would it be okay if we moved icedtea6 from inputs to native-inputs?  Ant
cannot run without Java, but which Java version should be used depends
on JAVA_HOME.  To compile the Ant libraries we only need *some* JDK at
build time, so I think making this a native input is appropriate.

Attached is an updated patch.

What do you think?

~~ Ricardo

Attachment: 0001-gnu-Add-Ant.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]