1 { callPackage, lib, javaPackages }:
3 versions = lib.importJSON ./versions.json;
5 latestVersion = lib.last (builtins.sort lib.versionOlder (builtins.attrNames versions));
6 escapeVersion = builtins.replaceStrings [ "." ] [ "-" ];
8 getJavaVersion = v: (builtins.getAttr "openjdk${toString v}" javaPackages.compiler).headless;
10 packages = lib.mapAttrs'
12 name = "vanilla-${escapeVersion version}";
13 value = callPackage ./derivation.nix {
14 inherit (value) version url sha1;
15 jre_headless = getJavaVersion (if value.javaVersion == null then 8 else value.javaVersion); # versions <= 1.6 will default to 8
20 lib.recurseIntoAttrs (
22 vanilla = builtins.getAttr "vanilla-${escapeVersion latestVersion}" packages;