Compare commits
3 commits
9fcd6f0269
...
096ab86dd0
Author | SHA1 | Date | |
---|---|---|---|
Tristan Daniël Maat | 096ab86dd0 | ||
Tristan Daniël Maat | c34e6b5342 | ||
Tristan Daniël Maat | 173339aa5b |
|
@ -12,12 +12,15 @@ let
|
|||
# really an odd one...
|
||||
a = head (match "0*([[:digit:]]+)" (substring 0 4 (toString id)));
|
||||
b = head (match "0*([[:digit:]]+)" (substring 4 7 (toString id)));
|
||||
encoded-filename = replaceStrings [ " " ] [ "%20" ] filename;
|
||||
|
||||
url = "https://media.forgecdn.net/files/${a}/${b}/${filename}";
|
||||
url = "https://media.forgecdn.net/files/${a}/${b}/${encoded-filename}";
|
||||
otherArgs = removeAttrs args [ "project" "project_id" "id" "filename" ];
|
||||
|
||||
in fetchurl (otherArgs // {
|
||||
inherit url;
|
||||
# Rename files to avoid names incompatible with the nix store
|
||||
name = "${project}.jar";
|
||||
# Avoid accidental URL globbing
|
||||
curlOpts = "--globoff";
|
||||
})
|
||||
|
|
|
@ -12,4 +12,5 @@ in {
|
|||
|
||||
# Minecraft modpacks
|
||||
voor-kia = callPackage ./minecraft/voor-kia.nix { };
|
||||
voor-kia-client = callPackage ./minecraft/voor-kia-client.nix { };
|
||||
}
|
||||
|
|
8
pkgs/minecraft/voor-kia-client.nix
Normal file
8
pkgs/minecraft/voor-kia-client.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, local-lib, stdenv }:
|
||||
|
||||
local-lib.minecraft.mkModpack {
|
||||
name = "voor-kia-client";
|
||||
version = "1.1";
|
||||
mods = (builtins.fromJSON (builtins.readFile ./voor-kia/mods.json))
|
||||
++ (builtins.fromJSON (builtins.readFile ./voor-kia/client-mods.json));
|
||||
}
|
86
pkgs/minecraft/voor-kia/client-mods.json
Normal file
86
pkgs/minecraft/voor-kia/client-mods.json
Normal file
|
@ -0,0 +1,86 @@
|
|||
[
|
||||
{
|
||||
"filename": "AmbientSounds_v3.1.9_mc1.16.5.jar",
|
||||
"id": 3334857,
|
||||
"project": "ambientsounds",
|
||||
"project_id": 254284,
|
||||
"sha256": "c8ed21587fe96745695aa9a8f23b6effbcc6a5c5340aed11b8515c0e0aa2c310"
|
||||
},
|
||||
{
|
||||
"filename": "BackTools-1.16.5-10.1.0.jar",
|
||||
"id": 3224955,
|
||||
"project": "back-tools",
|
||||
"project_id": 229061,
|
||||
"sha256": "cd5ed82919dd8acf2874c7edadba5bacfaffa898e572f8574241329e4478518e"
|
||||
},
|
||||
{
|
||||
"filename": "BetterAdvancements-1.16.5-0.1.1.111.jar",
|
||||
"id": 3400299,
|
||||
"project": "better-advancements",
|
||||
"project_id": 272515,
|
||||
"sha256": "83c159f83bebc1d0f72c9de465bdcbeb2b02a56b88dcaa6661fe54df50a9aab5"
|
||||
},
|
||||
{
|
||||
"filename": "Controlling-7.0.0.23.jar",
|
||||
"id": 3348514,
|
||||
"project": "controlling",
|
||||
"project_id": 250398,
|
||||
"sha256": "627308ed0b4fc1fdcc75113db8412c0684c3a774d1c6a07ae993543e605f5655"
|
||||
},
|
||||
{
|
||||
"filename": "EntityCulling-1.16.5-2.1.6.jar",
|
||||
"id": 3328602,
|
||||
"project": "entity-culling",
|
||||
"project_id": 409087,
|
||||
"sha256": "eede3bfc68f48acb3e06fec2ea280510287cd5d492a02b8ace8e0dda742d7342"
|
||||
},
|
||||
{
|
||||
"filename": "ftb-library-forge-1605.3.1-build.48.jar",
|
||||
"id": 3373833,
|
||||
"project": "ftb-library-forge",
|
||||
"project_id": 404465,
|
||||
"sha256": "f4f87f464796ee6ff7c80fb1fbc5753ac191138b6aa6b1a30c1b55252b3bf0a8"
|
||||
},
|
||||
{
|
||||
"filename": "InventoryHud_[1.16.2-1.16.5].forge-3.3.0.jar",
|
||||
"id": 3296748,
|
||||
"project": "inventory-hud-forge",
|
||||
"project_id": 357540,
|
||||
"sha256": "2b3a4f02fe84b717c9273ea14cea0912267c2c093fc2cdfcde2b6f032c9762e7"
|
||||
},
|
||||
{
|
||||
"filename": "MouseTweaks-2.14-mc1.16.2.jar",
|
||||
"id": 3202662,
|
||||
"project": "mouse-tweaks",
|
||||
"project_id": 60089,
|
||||
"sha256": "9d7e1aaee9f814c26d896e084e6e86930ab99e19fe547a1d350a6e25e4267092"
|
||||
},
|
||||
{
|
||||
"filename": "namepain-1.4.0 forge-1.16.x.jar",
|
||||
"id": 3356725,
|
||||
"project": "name-pain",
|
||||
"project_id": 366263,
|
||||
"sha256": "5cc9e83b6d06810cbfcc155ddcfbe417cd4553a2665025affd1b71bee0138f68"
|
||||
},
|
||||
{
|
||||
"filename": "overloadedarmorbar-5.1.0.jar",
|
||||
"id": 3055679,
|
||||
"project": "overloaded-armor-bar",
|
||||
"project_id": 314002,
|
||||
"sha256": "8aff59f170ef2c7598dc0f2367842f4384e57c13111507468da32498fc0ac4ea"
|
||||
},
|
||||
{
|
||||
"filename": "shutupexperimentalsettings-1.0.3.jar",
|
||||
"id": 3188120,
|
||||
"project": "shutup-experimental-settings",
|
||||
"project_id": 407174,
|
||||
"sha256": "22ce84a0d424c2d48e483cb873909ac5c8c322bc793d09365ad44b901f43de62"
|
||||
},
|
||||
{
|
||||
"filename": "Toast-Control-1.16.4-4.3.1.jar",
|
||||
"id": 3172881,
|
||||
"project": "toast-control",
|
||||
"project_id": 271740,
|
||||
"sha256": "b1cb36b7615c846f08c72423b2b52417b55eea91ca812bb7629a8f3060f5efae"
|
||||
}
|
||||
]
|
|
@ -119,11 +119,11 @@
|
|||
"sha256": "639778fd58667aa560d333a2490352e34c1c32e897d9f8204e52df305ca5e879"
|
||||
},
|
||||
{
|
||||
"filename": "citadel-1.7.2-1.16.5.jar",
|
||||
"id": 3390028,
|
||||
"filename": "citadel-1.7.1-1.16.5.jar",
|
||||
"id": 3346836,
|
||||
"project": "citadel",
|
||||
"project_id": 331936,
|
||||
"sha256": "c9b727acc3fc53ecfa7e33016c30eecfce407cb4690acba25375c64a76b7af17"
|
||||
"sha256": "2977c084dcbd23c4fa1ea00ea152f1792b38781eff8f0234de4d67b1ee35b849"
|
||||
},
|
||||
{
|
||||
"filename": "cloth-config-4.11.26-forge.jar",
|
||||
|
@ -139,13 +139,6 @@
|
|||
"project_id": 256717,
|
||||
"sha256": "1039d9ae78873107ee82c799e586c71dfe284d5bb58f89895a3a510f8f33c765"
|
||||
},
|
||||
{
|
||||
"filename": "flywheel-1.16-0.1.1.jar",
|
||||
"id": 3389159,
|
||||
"project": "flywheel",
|
||||
"project_id": 486392,
|
||||
"sha256": "ac0cc92d6ef491cc88ca3fbc3cb2c3180fe58ad1ce1c6f91dcfb996324d7331e"
|
||||
},
|
||||
{
|
||||
"filename": "expandability-2.0.1-forge.jar",
|
||||
"id": 3277762,
|
||||
|
@ -182,11 +175,11 @@
|
|||
"sha256": "a3516650a1c5e76b47b9efd69a4cfa9cda4f85250bf217fa7186f74ef375a7e4"
|
||||
},
|
||||
{
|
||||
"filename": "create-mc1.16.5_v0.3.2b.jar",
|
||||
"id": 3386319,
|
||||
"filename": "create-mc1.16.3_v0.3e.jar",
|
||||
"id": 3167531,
|
||||
"project": "create",
|
||||
"project_id": 328085,
|
||||
"sha256": "7b0180bf62abe862f7dcb83a4281447b00fd7a26d488cfc17e4d6f590782cc8f"
|
||||
"sha256": "8c24ee59c3d1c74fb2047564d0aa6935862b2b85fb478dadf19798f7cc08944f"
|
||||
},
|
||||
{
|
||||
"filename": "CreativeCore_v2.2.0_mc1.16.5.jar",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import argparse
|
||||
import json
|
||||
import hashlib
|
||||
import pathlib
|
||||
from copy import deepcopy
|
||||
from enum import Enum
|
||||
from typing import Dict, Generator, NamedTuple, Optional, Union
|
||||
|
@ -76,6 +77,7 @@ def main():
|
|||
parser.add_argument(
|
||||
"--mod-loader", choices=["none", "forge", "fabric"], default="forge"
|
||||
)
|
||||
parser.add_argument("--infile", type=pathlib.Path)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.mod_loader == "forge":
|
||||
|
@ -85,11 +87,11 @@ def main():
|
|||
else:
|
||||
raise AssertionError("Unreachable")
|
||||
|
||||
update(args.version, mod_loader)
|
||||
update(args.infile, args.version, mod_loader)
|
||||
|
||||
|
||||
def update(version: str, mod_loader: ModLoader):
|
||||
with open("./mods.json") as mods_json:
|
||||
def update(infile: pathlib.Path, version: str, mod_loader: ModLoader):
|
||||
with open(infile) as mods_json:
|
||||
mods = json.load(mods_json)
|
||||
|
||||
curse = CurseAPI()
|
||||
|
|
Loading…
Reference in a new issue