jdkPath: Remove in favor of jdk.home

Changed files
+9 -13
pkgs
development
compilers
icedtea
web
grails
top-level
+2 -2
pkgs/development/compilers/icedtea/default.nix
···
-
{ stdenv, fetchurl, jdk, jdkPath, ant, wget, zip, unzip, cpio, file, libxslt
+
{ stdenv, fetchurl, jdk, ant, wget, zip, unzip, cpio, file, libxslt
, xorg, zlib, pkgconfig, libjpeg, libpng, giflib, lcms2, gtk2, kerberos, attr
, alsaLib, procps, automake, autoconf, cups, which, perl, coreutils, binutils
, cacert, setJavaClassPath
···
"--without-rhino"
"--with-pax=paxctl"
-
"--with-jdk-home=${jdkPath}"
+
"--with-jdk-home=${jdk.home}"
];
preConfigure = ''
+6 -7
pkgs/development/web/grails/default.nix
···
{ stdenv, fetchurl, unzip
-
# If jdkPath is null, require JAVA_HOME in runtime environment, else store
-
# JAVA_HOME=${jdkPath} into grails.
-
, jdkPath ? null
+
# If jdk is null, require JAVA_HOME in runtime environment, else store
+
# JAVA_HOME=${jdk.home} into grails.
+
, jdk ? null
, coreutils, ncurses, gnused, gnugrep # for purity
}:
let
binpath = stdenv.lib.makeSearchPath "bin"
-
([ coreutils ncurses gnused gnugrep ]
-
++ stdenv.lib.optional (jdkPath != null) jdkPath);
+
([ coreutils ncurses gnused gnugrep ] ++ stdenv.lib.optional (jdk != null) jdk);
in
stdenv.mkDerivation rec {
name = "grails-2.4.3";
···
rm -f "$out"/bin/*.bat
# Improve purity
sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
-
'' + stdenv.lib.optionalString (jdkPath != null) ''
+
'' + stdenv.lib.optionalString (jdk != null) ''
# Inject JDK path into grails
-
sed -i -e '2iJAVA_HOME=${jdkPath}' "$out"/bin/grails
+
sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
'';
preferLocalBuild = true;
+1 -4
pkgs/top-level/all-packages.nix
···
grafx2 = callPackage ../applications/graphics/grafx2 {};
-
grails = callPackage ../development/web/grails {
-
jdkPath = jdk.home;
-
};
+
grails = callPackage ../development/web/grails { jdk = null; };
graphviz = callPackage ../tools/graphics/graphviz { };
···
icedtea7_jdk = callPackage ../development/compilers/icedtea rec {
jdk = openjdk;
-
jdkPath = openjdk.home;
giflib = giflib_5_0;
} // { outputs = [ "out" ]; };