From 1f6cebd6785beea9a0e31d5d1b84df91c3174813 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 | 80 +++++++++++++++++++ 1 file changed, 80 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..32c11c9aec7e52 --- /dev/null +++ b/pkgs/by-name/am/amulet-map-editor/package.nix @@ -0,0 +1,80 @@ +{ + 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 + numpy + pyopengl + packaging + amulet-core + amulet-nbt + pymctranslate + minecraft-resource-pack + platformdirs + ]; + + optional-dependencies = with python3.pkgs; { + dev = [ + black + pre-commit + ]; + docs = [ + sphinx + sphinx-autodoc-typehints + sphinx-rtd-theme + ]; + }; + + pythonRelaxDeps = [ "platformdirs" ]; + + pythonImportsCheck = [ "amulet_map_editor" ]; + + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; + + dontWrapGApps = true; + + 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 ]; + }; +}