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 (
16 if value.javaVersion == null then 8
17 else if value.javaVersion == 16 then 17
18 else value.javaVersion
19 ); # versions <= 1.6 will default to 8
24 lib.recurseIntoAttrs (
26 vanilla = builtins.getAttr "vanilla-${escapeVersion latestVersion}" packages;