diff --git a/flake.nix b/flake.nix index 078371e..2905aa8 100644 --- a/flake.nix +++ b/flake.nix @@ -38,25 +38,6 @@ commonDir = ./patches/common; prefix = if name == "client" then "overrides/" else ""; sideDir = toString ./patches + "/${name}"; - ae-fix = - if name == "server" then - '' - # Strip AE2 coremod registration from the jar — bansoukou already provides - # patched classes. The original jar's AE2ELTransformer would add - # readItemStack_ae2el_old to PacketBuffer, but bansoukou's patched - # PacketBuffer already has it, causing Duplicate method name error. - # We keep the jar for mod registration but remove the FMLCorePlugin - # manifest entry so the coremod (and its transformer) doesn't load. - mkdir -p mods/ae2-uel-v0.56.7 - cd mods/ae2-uel-v0.56.7 - unzip -qo ../ae2-uel-v0.56.7.jar - sed -i '/^FMLCorePlugin:/d' META-INF/MANIFEST.MF - zip -qr ../ae2-uel-v0.56.7.jar . - cd ../.. - rm -rf mods/ae2-uel-v0.56.7 - '' - else - ""; in pkgs.runCommand "nomifactory-harder-${name}" { @@ -105,11 +86,23 @@ done fi - ${ae-fix} + # Strip AE2 coremod registration from the jar — bansoukou already provides + # patched classes. The original jar's AE2ELTransformer would add + # readItemStack_ae2el_old to PacketBuffer, but bansoukou's patched + # PacketBuffer already has it, causing Duplicate method name error. + # We keep the jar for mod registration but remove the FMLCorePlugin + # manifest entry so the coremod (and its transformer) doesn't load. + mkdir -p mods/ae2-uel-v0.56.7 + cd mods/ae2-uel-v0.56.7 + unzip -qo ../ae2-uel-v0.56.7.jar + sed -i '/^FMLCorePlugin:/d' META-INF/MANIFEST.MF + zip -qr ../ae2-uel-v0.56.7.jar . + cd ../.. + rm -rf mods/ae2-uel-v0.56.7 # Inject extra mod jars into the correct directory for this side - mkdir -p "${modsDir}" - ${builtins.concatStringsSep "\n" (map (m: "cp ${m.src} \"${modsDir}/${m.jar}\"") extraMods)} + mkdir -p "${modsDir name}" + ${builtins.concatStringsSep "\n" (map (m: "cp ${m.src} \"${modsDir name}/${m.jar}\"") extraMods)} # Repack (zip auto-appends .zip; fix if it does) zip -qr "$out" . @@ -152,8 +145,8 @@ default = self.packages.${system}.server; server-oci = pkgs.dockerTools.buildImage { - name = "git.dzuchun.ing/dzu/nomisuffory"; - tag = "main"; + name = "nomifactory-harder-server"; + tag = "latest"; copyToRoot = pkgs.writeShellScriptBin "entrypoint" '' exec ${launch-server} /srv