2024-10-15 23:14:48 +00:00
|
|
|
{ callPackage
|
|
|
|
, lib
|
|
|
|
|
|
|
|
, javaPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
versions = lib.importJSON ./versions.json;
|
|
|
|
|
|
|
|
escapeVersion = builtins.replaceStrings [ "." ] [ "_" ];
|
|
|
|
getJavaVersion = v: (builtins.getAttr "openjdk${toString v}" javaPackages.compiler).headless;
|
|
|
|
|
|
|
|
packages = lib.mapAttrs'
|
|
|
|
(version: value: {
|
|
|
|
name = escapeVersion version;
|
|
|
|
value = callPackage ./fabric-server.nix {
|
|
|
|
inherit (value) mainClass libraries;
|
|
|
|
inherit (versions) fabricLoaderVersion;
|
2024-10-18 16:18:45 +00:00
|
|
|
|
2024-10-15 23:14:48 +00:00
|
|
|
minecraftVersion = version;
|
|
|
|
|
2024-10-18 16:18:45 +00:00
|
|
|
jdk_headless = getJavaVersion value.vanilla.javaVersion;
|
2024-10-15 23:14:48 +00:00
|
|
|
|
2024-10-18 16:18:45 +00:00
|
|
|
serverJarUrl = value.vanilla.serverJar.url;
|
|
|
|
serverJarSha1 = value.vanilla.serverJar.sha1;
|
2024-10-15 23:14:48 +00:00
|
|
|
};
|
|
|
|
})
|
|
|
|
versions.versions;
|
|
|
|
in
|
|
|
|
lib.recurseIntoAttrs packages
|