feat(fabric-mods): add fetchModrinthMod
This commit is contained in:
parent
7ee0261030
commit
662c955313
2 changed files with 8 additions and 0 deletions
6
pkgs/fabric-mods/fetchModrinthMod.nix
Normal file
6
pkgs/fabric-mods/fetchModrinthMod.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ stdenv, fetchurl, id, responseHash }:
|
||||
let
|
||||
version = (builtins.fromJSON (builtins.readFile (fetchurl { url = "https://api.modrinth.com/v2/version/${id}"; sha256 = responseHash; })));
|
||||
file = (builtins.elemAt version.files 0);
|
||||
in
|
||||
fetchurl { url = file.url; sha512 = file.hashes.sha512; }
|
Loading…
Add table
Add a link
Reference in a new issue