Files
nix-config-v2/modules/games/homestead/package.nix
T

48 lines
1.3 KiB
Nix
Raw Normal View History

2026-10-27 13:47:25 -04:00
{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
let
# These eight downloads come from startserver.sh in the official 2.0 pack.
requiredMods = map fetchurl (lib.importJSON ./required-mods.json);
in
stdenvNoCC.mkDerivation {
pname = "homestead-server-pack";
version = "2.0";
src = fetchurl {
name = "Homestead-2.0-Server.zip";
url = "https://drive.usercontent.google.com/download?id=1SpJBa80o_Jx_yqLjQ49pz7HP1FY2PCJj&export=download&confirm=t";
hash = "sha256-QVenE6dz+lZPHkC1hwL7Yy4lw6vg/Cr/8pnmK3iaK4o=";
};
nativeBuildInputs = [ unzip ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
unzip -q "$src" \
'mods/*' 'config/*' 'defaultconfigs/*' 'kubejs/*' \
'scripts/*' 'patchouli_books/*' 'server-icon.png' -d "$out"
${lib.concatMapStringsSep "\n" (mod: ''
install -m644 ${mod} "$out/mods/${mod.name}"
'') requiredMods}
runHook postInstall
'';
meta = {
description = "Homestead 2.0 server assets, including the eight separately downloaded mods";
homepage = "https://cozystudios.org/homestead/server-pack/";
# The pack contains mods with different licenses; do not redistribute it.
license = lib.licenses.unfree;
platforms = lib.platforms.linux;
};
}