From 0459c46122922bdfd307611ca8241c3da6a55c1e Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 25 Jul 2024 09:27:07 -0700 Subject: [PATCH] fix(minecraft): build with lief 0.15 --- packages/minecraft-bedrock/patchdebug.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/minecraft-bedrock/patchdebug.nix b/packages/minecraft-bedrock/patchdebug.nix index ee0d6e2f..c3a702f5 100644 --- a/packages/minecraft-bedrock/patchdebug.nix +++ b/packages/minecraft-bedrock/patchdebug.nix @@ -6,12 +6,15 @@ # https://github.com/minecraft-linux/server-modloader/tree/master?tab=readme-ov-file#getting-mods-to-work-on-newer-versions-116 inherit (lib.meta) getExe; python = python3.withPackages (p: [p.lief]); + static_symbols = if lib.versionAtLeast python3.pkgs.lief.version "0.15.0" + then "symtab_symbols" + else "static_symbols"; script = '' import lief import sys lib_symbols = lief.parse(sys.argv[1]) - for s in filter(lambda e: e.exported, lib_symbols.static_symbols): + for s in filter(lambda e: e.exported, lib_symbols.${static_symbols}): lib_symbols.add_dynamic_symbol(s) lib_symbols.write(sys.argv[2]) '';