Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amulet Editor #201016

Open
olifloof opened this issue Nov 13, 2022 · 1 comment · May be fixed by #356035
Open

Amulet Editor #201016

olifloof opened this issue Nov 13, 2022 · 1 comment · May be fixed by #356035
Assignees
Labels

Comments

@olifloof
Copy link
Contributor

Project description
A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7.

Metadata

@olifloof olifloof added the 0.kind: packaging request Request for a new package to be added label Nov 13, 2022
@frantisekhanzlikbl
Copy link
Contributor

I don't currently have the time to maintain stuff, but in case anyone else needs it, here's a derivation I cobbled together in an hour:

{ pkgs ? import <nixpkgs> {}, ... }: let
	inherit (pkgs) fetchurl;
	pythonPackages = pkgs.python39Packages;

	versioneer-518 = pythonPackages.buildPythonPackage rec {
		pname = "versioneer-518";
		version = "0.19";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/cb/57/402e9c0647adb56bd52a9820ce1567afd6d67e63126be75f417be996f64f/versioneer-518-0.19.tar.gz"; hash = "sha256-oodgiZdBX0VAGEnRInpCu0G4Cm5KfaV3Zmb4XOb67EE="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel ];
	};
	platformdirs-3_11 = pythonPackages.buildPythonPackage rec {
		pname = "platformdirs";
		version = "3.11.0";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/d3/e3/aa14d6b2c379fbb005993514988d956f1b9fdccd9cbe78ec0dbe5fb79bf5/platformdirs-3.11.0.tar.gz"; hash = "sha256-z47lKjr9uWUHLcxlJDPgx+PkDPXqFHfNSzsdLrdUlbM="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel ];
		dependencies = with pythonPackages; [ hatchling hatch-vcs ];
	};
	amulet-nbt = pythonPackages.buildPythonPackage rec {
		pname = "amulet-nbt";
		version = "2.1.3";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/00/b9/48aa1754bc30143d7623253ff507986123829e9ae78a266ec34e08c0c544/amulet-nbt-2.1.3.tar.gz"; hash = "sha256-qd5P4GgynHqSHwndTOw3wlwBrCq+tOEAAOguUm420Pw="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel cython versioneer-518 ];
		dependencies = with pythonPackages; [ numpy mutf8 ];
	};
	amulet-leveldb = pythonPackages.buildPythonPackage rec {
		pname = "amulet-leveldb";
		version = "1.0.2";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/8a/69/03882a4a7ed933d1f0c622d93a5b2eef2fa51c4bf8ca1ec84d43b88eb113/amulet_leveldb-1.0.2.tar.gz"; hash = "sha256-s6pRHvcb9rxrIeljlb3tDzkrHcCT71jVU1Bn2Aq0FUE="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel cython versioneer ];
		buildInputs = with pkgs; [
			zlib
		];
	};
	amulet-core = pythonPackages.buildPythonPackage rec {
		pname = "amulet-core";
		version = "1.9.25";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/5c/4b/66c4feaaf5610c152e228ec9e733326c557edd5b7c1e9853a7fc73b88d02/amulet_core-1.9.25.tar.gz"; hash = "sha256-udA4JJT7ldj0lJhM8UslZtSQHYVILl9HWNKFFGb4S2g="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel cython versioneer-518 ];
		dependencies = with pythonPackages; [ numpy amulet-nbt pymctranslate portalocker amulet-leveldb platformdirs-3_11 lz4 ];
	};
	pymctranslate = pythonPackages.buildPythonPackage rec {
		pname = "pymctranslate";
		version = "1.2.28";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/5c/a9/8e1103460f01dad65df6eeee473398eb44759c92d3cf1c5b3b81e2f7bd2f/pymctranslate-1.2.28.tar.gz"; hash = "sha256-Lh5ctBp0V44BkDvmOpFmKpiSJex0kxwef2fzZNJKDjg="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel versioneer-518 ];
		dependencies = with pythonPackages; [ numpy amulet-nbt ];
	};
	minecraft-resource-pack = pythonPackages.buildPythonPackage rec {
		pname = "minecraft-resource-pack";
		version = "1.4.4";
		src = fetchurl { url = "https://files.pythonhosted.org/packages/0e/c7/0765e2d81aee3ea998de4cbe1caeeeeafb483aee44b4af61a6ad75d74f9d/minecraft_resource_pack-1.4.4.tar.gz"; hash = "sha256-rsD3RhE7PUNaPs3yqW8McZb/kddaXl41FC2ELA6Kqj0="; };
		pyproject = true;
		build-system = with pythonPackages; [ setuptools wheel versioneer ];
		dependencies = with pythonPackages; [ pillow numpy amulet-nbt platformdirs-3_11 ];
	};
in pythonPackages.buildPythonApplication rec {
	pname = "amulet-map-editor";
	version = "0.10.35";

	src = fetchurl {
		url = "https://files.pythonhosted.org/packages/92/ad/7f808413857992512188eaed55108be7201cf18defcd36e8ed9fe9d9c3fc/amulet_map_editor-0.10.35.tar.gz";
		hash = "sha256-2aJK+gT8S+PKAp1e8bs5SzJJdTPU4Xbj10L0Ptq2MZo=";
	};

	pyproject = true;
	build-system = with pythonPackages; [ setuptools wheel cython versioneer ];
	dependencies = with pythonPackages; [
		numpy
	
		amulet-core
		amulet-nbt
	
		pillow
		wxpython
		pyopengl
		pymctranslate
		minecraft-resource-pack
		platformdirs-3_11
	];
}

It's ugly, and I'm not at all sure whether I put the right dependencies in the right places, as I have no (positive) experience with the Python ecosystem, but it seems to work somewhat.

@pluiedev pluiedev self-assigned this Nov 14, 2024
@pluiedev pluiedev linked a pull request Nov 14, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants