-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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-map-editor: init at 0.10.37 #356035
Open
pluiedev
wants to merge
7
commits into
NixOS:master
Choose a base branch
from
pluiedev:push-yyrtrlztnppr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
055947c
lib/licenses: add amulet
pluiedev d14cf81
python312Packages.amulet-leveldb: init at 1.0.2
pluiedev 32dc322
python312Packages.amulet-nbt: init at 2.1.3
pluiedev e749841
python312Packages.minecraft-resource-pack: init at 1.4.5
pluiedev e27ec26
python312Packages.pymctranslate: init at 1.2.29
pluiedev 51915e6
python312Packages.amulet-core: init at 1.9.27
pluiedev be117c4
amulet-map-editor: init at 0.10.37
pluiedev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
lib, | ||
python3, | ||
fetchFromGitHub, | ||
nix-update-script, | ||
wrapGAppsHook3, | ||
gtk3, | ||
}: | ||
let | ||
version = "0.10.39"; | ||
in | ||
python3.pkgs.buildPythonApplication { | ||
pname = "amulet-map-editor"; | ||
inherit version; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Amulet-Team"; | ||
repo = "Amulet-Map-Editor"; | ||
tag = version; | ||
hash = "sha256-6HwASoAi4amPTzAFnUTxn2PCzBRKi0wFXcTN1l10O8U="; | ||
}; | ||
|
||
nativeBuildInputs = [ wrapGAppsHook3 ]; | ||
|
||
build-system = with python3.pkgs; [ | ||
setuptools | ||
wheel | ||
cython | ||
versioneer | ||
numpy | ||
]; | ||
|
||
buildInputs = [ gtk3 ]; | ||
|
||
dependencies = with python3.pkgs; [ | ||
pillow | ||
wxpython | ||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
numpy | ||
pyopengl | ||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
packaging | ||
amulet-core | ||
amulet-nbt | ||
pymctranslate | ||
minecraft-resource-pack | ||
platformdirs | ||
]; | ||
|
||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
optional-dependencies = with python3.pkgs; { | ||
dev = [ | ||
black | ||
pre-commit | ||
]; | ||
docs = [ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
]; | ||
}; | ||
|
||
pythonRelaxDeps = [ "platformdirs" ]; | ||
|
||
preBuild = '' | ||
export HOME=$(mktemp -d) | ||
''; | ||
|
||
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/${version}"; | ||
license = with lib.licenses; [ amulet ]; | ||
maintainers = with lib.maintainers; [ pluiedev ]; | ||
}; | ||
} |
105 changes: 105 additions & 0 deletions
105
pkgs/development/python-modules/amulet-core/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pythonOlder, | ||
|
||
# build-system | ||
setuptools, | ||
wheel, | ||
cython, | ||
versioneer, | ||
numpy, | ||
|
||
# dependencies | ||
amulet-nbt, | ||
pymctranslate, | ||
portalocker, | ||
amulet-leveldb, | ||
platformdirs, | ||
lz4, | ||
black, | ||
pre-commit, | ||
sphinx, | ||
sphinx-autodoc-typehints, | ||
sphinx-rtd-theme, | ||
|
||
pytestCheckHook, | ||
nix-update-script, | ||
}: | ||
let | ||
version = "1.9.27"; | ||
in | ||
buildPythonPackage { | ||
pname = "amulet-core"; | ||
inherit version; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Amulet-Team"; | ||
repo = "Amulet-Core"; | ||
tag = version; | ||
hash = "sha256-cwk70qg97BIFPTpBnGG5WQElzvS5CYP5HIEIYd0w96I="; | ||
}; | ||
|
||
disabled = pythonOlder "3.9"; | ||
|
||
postPatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace-fail 'versioneer-518' 'versioneer' | ||
|
||
substituteInPlace setup.py \ | ||
--replace-fail "versioneer.get_version()" "'${version}'" | ||
''; | ||
|
||
build-system = [ | ||
setuptools | ||
wheel | ||
cython | ||
versioneer | ||
numpy | ||
]; | ||
|
||
dependencies = [ | ||
numpy | ||
amulet-nbt | ||
pymctranslate | ||
portalocker | ||
amulet-leveldb | ||
platformdirs | ||
lz4 | ||
]; | ||
|
||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
optional-dependencies = { | ||
dev = [ | ||
black | ||
pre-commit | ||
]; | ||
docs = [ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
]; | ||
}; | ||
|
||
pythonRelaxDeps = [ "platformdirs" ]; | ||
|
||
pythonImportsCheck = [ "amulet" ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
preCheck = '' | ||
# Required for tests that want to write to the home directory | ||
export HOME=$(mktemp -d) | ||
''; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "Python library for reading and writing the Minecraft save formats"; | ||
homepage = "https://github.com/Amulet-Team/Amulet-Core"; | ||
changelog = "https://github.com/Amulet-Team/Amulet-Core/releases/tag/${version}"; | ||
license = with lib.licenses; [ amulet ]; | ||
maintainers = with lib.maintainers; [ pluiedev ]; | ||
}; | ||
} |
90 changes: 90 additions & 0 deletions
90
pkgs/development/python-modules/amulet-leveldb/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pythonOlder, | ||
zlib, | ||
|
||
# build-system | ||
setuptools, | ||
wheel, | ||
cython, | ||
versioneer, | ||
black, | ||
pre-commit, | ||
sphinx, | ||
sphinx-autodoc-typehints, | ||
sphinx-rtd-theme, | ||
|
||
pytestCheckHook, | ||
nix-update-script, | ||
}: | ||
let | ||
version = "1.0.2"; | ||
in | ||
buildPythonPackage { | ||
pname = "amulet-leveldb"; | ||
inherit version; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Amulet-Team"; | ||
repo = "Amulet-LevelDB"; | ||
tag = version; | ||
hash = "sha256-7VJb5TEa3GcwNEZYrnwP3yMWdpxkHeFcydCCeHiB3+w="; | ||
|
||
postFetch = '' | ||
# De-vendor zlib | ||
rm -r $out/zlib | ||
''; | ||
fetchSubmodules = true; | ||
}; | ||
|
||
disabled = pythonOlder "3.8"; | ||
|
||
postPatch = '' | ||
substituteInPlace setup.py \ | ||
--replace-fail "versioneer.get_version()" "'${version}'" | ||
''; | ||
|
||
build-system = [ | ||
setuptools | ||
wheel | ||
cython | ||
versioneer | ||
]; | ||
|
||
buildInputs = [ zlib ]; | ||
|
||
optional-dependencies = { | ||
dev = [ | ||
black | ||
pre-commit | ||
]; | ||
docs = [ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
]; | ||
}; | ||
|
||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pythonImportsCheck = [ "leveldb" ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
# FIXME(pluiedev): I... frankly don't know why this fails. | ||
# try: | ||
# self.assertTrue(40_000 <= len(list(db.keys())) < 100_000) | ||
# ^ AssertionError: False is not true | ||
disabledTests = [ "test_corrupt" ]; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "Cython wrapper for Mojang's custom LevelDB"; | ||
homepage = "https://github.com/Amulet-Team/Amulet-LevelDB"; | ||
changelog = "https://github.com/Amulet-Team/Amulet-LevelDB/releases/tag/${version}"; | ||
license = with lib.licenses; [ amulet ]; | ||
maintainers = with lib.maintainers; [ pluiedev ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pythonOlder, | ||
|
||
# build-system | ||
setuptools, | ||
wheel, | ||
versioneer, | ||
cython, | ||
|
||
# dependencies | ||
numpy, | ||
mutf8, | ||
black, | ||
pre-commit, | ||
sphinx, | ||
sphinx-autodoc-typehints, | ||
sphinx-rtd-theme, | ||
|
||
pytestCheckHook, | ||
nix-update-script, | ||
}: | ||
let | ||
version = "2.1.3"; | ||
in | ||
buildPythonPackage { | ||
pname = "amulet-nbt"; | ||
inherit version; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Amulet-Team"; | ||
repo = "Amulet-NBT"; | ||
tag = version; | ||
hash = "sha256-ucN/CFPYWEPPiqrK9v2VZ1l5s2jf0N0tNuxpYoTZQ4s="; | ||
}; | ||
|
||
disabled = pythonOlder "3.9"; | ||
|
||
postPatch = '' | ||
# FIXME: Drop for 4.x | ||
substituteInPlace pyproject.toml \ | ||
--replace-fail 'versioneer-518' 'versioneer' | ||
|
||
substituteInPlace setup.py \ | ||
--replace-fail "versioneer.get_version()" "'${version}'" | ||
''; | ||
|
||
build-system = [ | ||
setuptools | ||
wheel | ||
cython | ||
versioneer | ||
numpy | ||
]; | ||
|
||
dependencies = [ | ||
numpy | ||
mutf8 | ||
]; | ||
|
||
pluiedev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
optional-dependencies = { | ||
dev = [ | ||
black | ||
pre-commit | ||
]; | ||
docs = [ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
]; | ||
}; | ||
|
||
pythonImportsCheck = [ "amulet_nbt" ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
# Source files interfere with tests :( | ||
preCheck = '' | ||
rm -r amulet_nbt | ||
''; | ||
|
||
# FIXME: Drop for 4.x, somehow it's just not implemented at all | ||
disabledTestPaths = [ "tests/base_type_test.py" ]; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "Python library for reading and writing binary NBT and stringified NBT"; | ||
homepage = "https://github.com/Amulet-Team/Amulet-NBT"; | ||
changelog = "https://github.com/Amulet-Team/Amulet-NBT/releases/tag/${version}"; | ||
license = with lib.licenses; [ amulet ]; | ||
maintainers = with lib.maintainers; [ pluiedev ]; | ||
}; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also make this a python module and use
python3Packages.toPythonApplication
here -- which would help you avoid so manywith python3.pkgs;
, etc. Up to you though ;)