2 versions = builtins.fromJSON (builtins.readFile ./versions.json);
4 { callPackage, lib, ... }:
6 latestVersion = lib.last (builtins.sort lib.versionOlder (builtins.attrNames versions));
7 escapeVersion = builtins.replaceStrings [ "." ] [ "_" ];
8 packages = lib.mapAttrs'
10 name = "papermc-${escapeVersion version}";
11 value = callPackage ./derivation.nix { inherit (value) version hash; };
15 lib.recurseIntoAttrs (packages // {
16 papermc = builtins.getAttr "papermc-${escapeVersion latestVersion}" packages;