From b6a25f2de47941b8900354c3dd0b0cfea7781db8 Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Tue, 16 Jul 2019 10:37:04 +0200 Subject: doc: put Java software's build-time dependencies into nativeBuildInputs instead of into buildInputs --- doc/languages-frameworks/java.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc/languages-frameworks/java.xml') diff --git a/doc/languages-frameworks/java.xml b/doc/languages-frameworks/java.xml index 287f63e685c4..68a1a097984d 100644 --- a/doc/languages-frameworks/java.xml +++ b/doc/languages-frameworks/java.xml @@ -10,7 +10,7 @@ stdenv.mkDerivation { name = "..."; src = fetchurl { ... }; - buildInputs = [ jdk ant ]; + nativeBuildInputs = [ jdk ant ]; buildPhase = "ant"; } @@ -30,7 +30,8 @@ stdenv.mkDerivation { foo.jar in its share/java directory, and another package declares the attribute -buildInputs = [ jdk libfoo ]; +buildInputs = [ libfoo ]; +nativeBuildInputs = [ jdk ]; then CLASSPATH will be set to /nix/store/...-libfoo/share/java/foo.jar. @@ -46,7 +47,7 @@ buildInputs = [ jdk libfoo ]; script to run it using the OpenJRE. You can use makeWrapper for this: -buildInputs = [ makeWrapper ]; +nativeBuildInputs = [ makeWrapper ]; installPhase = '' @@ -76,7 +77,7 @@ installPhase = It is possible to use a different Java compiler than javac from the OpenJDK. For instance, to use the GNU Java Compiler: -buildInputs = [ gcj ant ]; +nativeBuildInputs = [ gcj ant ]; Here, Ant will automatically use gij (the GNU Java Runtime) instead of the OpenJRE. -- cgit 1.4.1