mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
doc: put Java software's build-time dependencies into nativeBuildInputs
instead of into buildInputs
This commit is contained in:
parent
42fa330b04
commit
b6a25f2de4
@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
|||||||
name = "...";
|
name = "...";
|
||||||
src = fetchurl { ... };
|
src = fetchurl { ... };
|
||||||
|
|
||||||
buildInputs = [ jdk ant ];
|
nativeBuildInputs = [ jdk ant ];
|
||||||
|
|
||||||
buildPhase = "ant";
|
buildPhase = "ant";
|
||||||
}
|
}
|
||||||
@ -30,7 +30,8 @@ stdenv.mkDerivation {
|
|||||||
<filename>foo.jar</filename> in its <filename>share/java</filename>
|
<filename>foo.jar</filename> in its <filename>share/java</filename>
|
||||||
directory, and another package declares the attribute
|
directory, and another package declares the attribute
|
||||||
<programlisting>
|
<programlisting>
|
||||||
buildInputs = [ jdk libfoo ];
|
buildInputs = [ libfoo ];
|
||||||
|
nativeBuildInputs = [ jdk ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
then <envar>CLASSPATH</envar> will be set to
|
then <envar>CLASSPATH</envar> will be set to
|
||||||
<filename>/nix/store/...-libfoo/share/java/foo.jar</filename>.
|
<filename>/nix/store/...-libfoo/share/java/foo.jar</filename>.
|
||||||
@ -46,7 +47,7 @@ buildInputs = [ jdk libfoo ];
|
|||||||
script to run it using the OpenJRE. You can use
|
script to run it using the OpenJRE. You can use
|
||||||
<literal>makeWrapper</literal> for this:
|
<literal>makeWrapper</literal> for this:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
buildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
@ -76,7 +77,7 @@ installPhase =
|
|||||||
It is possible to use a different Java compiler than <command>javac</command>
|
It is possible to use a different Java compiler than <command>javac</command>
|
||||||
from the OpenJDK. For instance, to use the GNU Java Compiler:
|
from the OpenJDK. For instance, to use the GNU Java Compiler:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
buildInputs = [ gcj ant ];
|
nativeBuildInputs = [ gcj ant ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Here, Ant will automatically use <command>gij</command> (the GNU Java
|
Here, Ant will automatically use <command>gij</command> (the GNU Java
|
||||||
Runtime) instead of the OpenJRE.
|
Runtime) instead of the OpenJRE.
|
||||||
|
Loading…
Reference in New Issue
Block a user