2021-12-10 11:45:19 +00:00
|
|
|
{ callPackage, lib }:
|
|
|
|
# if you add more versions make sure to add to all-packages.nix
|
|
|
|
let
|
|
|
|
versions = lib.importJSON ./versions.json;
|
|
|
|
latestVersion = lib.last (builtins.sort lib.versionOlder (builtins.attrNames versions));
|
|
|
|
escapeVersion = builtins.replaceStrings [ "." ] [ "_" ];
|
|
|
|
|
|
|
|
packages = lib.mapAttrs'
|
|
|
|
(version: value: {
|
|
|
|
name = "minecraft-server_${escapeVersion version}";
|
|
|
|
value = callPackage ./derivation.nix { inherit (value) version url sha1; };
|
|
|
|
})
|
|
|
|
versions;
|
|
|
|
in
|
|
|
|
packages // {
|
|
|
|
minecraft-server = builtins.getAttr "minecraft-server_${escapeVersion latestVersion}" packages;
|
2014-03-29 09:48:08 +00:00
|
|
|
}
|