From 0675b244e25036a10592057d878a4811ea5bf867 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Fri, 15 Nov 2024 00:07:34 +0100 Subject: [PATCH] amulet-map-editor: init at 0.10.37 --- pkgs/by-name/am/amulet-map-editor/package.nix | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 pkgs/by-name/am/amulet-map-editor/package.nix diff --git a/pkgs/by-name/am/amulet-map-editor/package.nix b/pkgs/by-name/am/amulet-map-editor/package.nix new file mode 100644 index 00000000000000..3f7e83b0ad352a --- /dev/null +++ b/pkgs/by-name/am/amulet-map-editor/package.nix @@ -0,0 +1,68 @@ +{ + lib, + python3, + fetchFromGitHub, + nix-update-script, + wrapGAppsHook3, + gtk3, +}: +let + version = "0.10.37"; + + src = fetchFromGitHub { + owner = "Amulet-Team"; + repo = "Amulet-Map-Editor"; + rev = "refs/tags/${version}"; + hash = "sha256-2ZckXZABpZQtSsOXXSZRA+zePftCeuC49CFOCPdSuzY="; + }; +in +python3.pkgs.buildPythonApplication { + pname = "amulet-map-editor"; + inherit version src; + pyproject = true; + + nativeBuildInputs = [ wrapGAppsHook3 ]; + + build-system = with python3.pkgs; [ + setuptools + wheel + cython + versioneer + numpy + ]; + + buildInputs = [ gtk3 ]; + + dependencies = with python3.pkgs; [ + pillow + wxpython + pyopengl + amulet-core + amulet-nbt + pymctranslate + minecraft-resource-pack + platformdirs + ]; + + pythonRelaxDeps = [ "platformdirs" ]; + + pythonImportsCheck = [ "amulet_map_editor" ]; + + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; + + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7"; + homepage = "https://github.com/Amulet-Team/Amulet-Map-Editor"; + changelog = "https://github.com/Amulet-Team/Amulet-Map-Editor/releases/tag/${src.rev}"; + license = with lib.licenses; [ amulet ]; + maintainers = with lib.maintainers; [ pluiedev ]; + }; +}