nix-fabric/minecraft-jars.nix

37 lines
900 B
Nix
Raw Normal View History

2024-10-18 16:18:45 +00:00
{ callPackage
, lib
, fetchurl
, javaPackages
}:
let
versions = lib.importJSON ./versions.json;
escapeVersion = builtins.replaceStrings [ "." ] [ "_" ];
getJavaVersion = v: (builtins.getAttr "openjdk${toString v}" javaPackages.compiler).headless;
in
lib.mapAttrs'
(version: value: {
name = escapeVersion version;
value = {
client = fetchurl {
url = value.vanilla.clientJar.url;
sha1 = value.vanilla.clientJar.sha1;
};
server = fetchurl {
url = value.vanilla.serverJar.url;
sha1 = value.vanilla.serverJar.sha1;
};
manifest = fetchurl value.vanilla.manifest;
manifest-info = value.vanilla.manifest;
2024-10-18 16:18:45 +00:00
javaVersion = getJavaVersion value.vanilla.javaVersion;
2024-10-19 17:45:30 +00:00
intermediary = fetchurl {
url = value.intermediary.url;
hash = value.intermediary.sha256;
};
2024-10-18 16:18:45 +00:00
};
})
versions.versions