fork/nix-minecraft
git clone https://git.julia.blue/fork/nix-minecraft
dc3914e
feat/legacy-fabric-servers
1{ stdenv 2, fetchurl 3, jq 4, id 5, hash 6} : 7let 8version = builtins . fromJSON 9( builtins . readFile 10( fetchurl { 11url = "https://api.modrinth.com/v2/version/ ${ id } " ; 12sha256 = hash ; 13downloadToTemp = true ; 14postFetch = '' 15cat $ downloadedFile \ 16| jq -c '.files | (.[] | select(.primary == true)) // .[0] | {url: .url, sha512: .hashes.sha512}' > $ out 17'' ; 18nativeBuildInputs = [ jq ]; 19})); 20in 21fetchurl { inherit ( version ) url sha512 ; }