about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-04-28 18:30:53 +0200
committerGitHub <noreply@github.com>2023-04-28 18:30:53 +0200
commita9a78172682c0c991c73d88e6f77771731f7086d (patch)
tree9b6ae6baa76b82e1d88efcce59ed9a4f1a594cee
parentf7d3416580ed3517f3052edc17549c294185b870 (diff)
parente9efa398cf97b9044415c9b2547995fc0daa96c1 (diff)
Merge pull request #200020 from marius851000/skytemple1.3.11post1
skytemple: 1.3.10 -> 1.4.7
-rw-r--r--pkgs/applications/misc/skytemple/default.nix12
-rw-r--r--pkgs/development/python-modules/explorerscript/default.nix13
-rw-r--r--pkgs/development/python-modules/pmdsky-debug-py/default.nix33
-rw-r--r--pkgs/development/python-modules/py-desmume/default.nix6
-rw-r--r--pkgs/development/python-modules/range-typed-integers/default.nix34
-rw-r--r--pkgs/development/python-modules/skytemple-files/default.nix64
-rw-r--r--pkgs/development/python-modules/skytemple-rust/default.nix11
-rw-r--r--pkgs/development/python-modules/skytemple-ssb-debugger/default.nix23
-rw-r--r--pkgs/development/python-modules/tilequant/default.nix19
-rw-r--r--pkgs/top-level/python-packages.nix4
10 files changed, 168 insertions, 51 deletions
diff --git a/pkgs/applications/misc/skytemple/default.nix b/pkgs/applications/misc/skytemple/default.nix
index 2ec034e882e18..c1a77d634d353 100644
--- a/pkgs/applications/misc/skytemple/default.nix
+++ b/pkgs/applications/misc/skytemple/default.nix
@@ -2,7 +2,7 @@
 , fetchFromGitHub
 , gobject-introspection
 , gtk3
-, gtksourceview3
+, gtksourceview4
 , webkitgtk
 , wrapGAppsHook
 , python3Packages
@@ -10,19 +10,19 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "skytemple";
-  version = "1.3.10";
+  version = "1.4.7";
 
   src = fetchFromGitHub {
     owner = "SkyTemple";
     repo = pname;
-    rev = version;
-    hash = "sha256-CyYGTXdQsGpDR/gpqViEQO1xUPHaXTES592nRJixa1o=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-NK0yLxs7/pVpl9LCz6ggYsaUDuEAj6edBEPC+4yCxNM=";
   };
 
   buildInputs = [
     gobject-introspection
     gtk3
-    gtksourceview3
+    gtksourceview4
     # webkitgkt is used for rendering interactive statistics graph which
     # can be seen by opening a ROM, entering Pokemon section, selecting
     # any Pokemon, and clicking Stats and Moves tab.
@@ -52,7 +52,7 @@ python3Packages.buildPythonApplication rec {
     skytemple-icons
     skytemple-ssb-debugger
     tilequant
-  ];
+  ] ++ skytemple-files.optional-dependencies.spritecollab;
 
   doCheck = false; # there are no tests
 
diff --git a/pkgs/development/python-modules/explorerscript/default.nix b/pkgs/development/python-modules/explorerscript/default.nix
index cd31e6ff0101f..b3ecf7a3fce21 100644
--- a/pkgs/development/python-modules/explorerscript/default.nix
+++ b/pkgs/development/python-modules/explorerscript/default.nix
@@ -1,7 +1,6 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, fetchpatch
 , antlr4
 , antlr4-python3-runtime
 , igraph
@@ -11,27 +10,19 @@
 
 buildPythonPackage rec {
   pname = "explorerscript";
-  version = "0.1.1";
+  version = "0.1.2";
 
   src = fetchFromGitHub {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    sha256 = "1vzyliiyrxx8l9sfbqcyr4xn5swd7znkxy69kn0vb5rban8hm9c1";
+    sha256 = "sha256-REQYyxB2sb/gG54+OkMw+M4Agg9SWfAyqAhiSNnd3tE=";
   };
 
   nativeBuildInputs = [
     antlr4
   ];
 
-  patches = [
-    # https://github.com/SkyTemple/ExplorerScript/pull/17
-    (fetchpatch {
-      url = "https://github.com/SkyTemple/ExplorerScript/commit/47d8b3d246881d675a82b4049b87ed7d9a0e1b15.patch";
-      sha256 = "0sadw9l2nypl2s8lw526lvbdj4rzqdvrjncx4zxxgyp3x47csb48";
-    })
-  ];
-
   postPatch = ''
     sed -i "s/antlr4-python3-runtime.*/antlr4-python3-runtime',/" setup.py
     antlr -Dlanguage=Python3 -visitor explorerscript/antlr/{ExplorerScript,SsbScript}.g4
diff --git a/pkgs/development/python-modules/pmdsky-debug-py/default.nix b/pkgs/development/python-modules/pmdsky-debug-py/default.nix
new file mode 100644
index 0000000000000..3f7e3305b98e1
--- /dev/null
+++ b/pkgs/development/python-modules/pmdsky-debug-py/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+}:
+
+#This package is auto-generated. It could totally be possible to generate it from upstream, but seems unecessary
+buildPythonPackage rec {
+  pname = "pmdsky-debug-py";
+  version = "4.0.0";
+  # SkyTemple specifically require this version. This is used when patching the binary,
+  # and risk to be a bit problematic if using the latest version, given it doesn’t follow semver.
+
+  src = fetchFromGitHub {
+    owner = "SkyTemple";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-iRiUZoyWAkFGPvRyQRWvI0210Vk2jPS0PSCCCns5yJI=";
+  };
+
+  prePatch = "cd src";
+
+  format = "pyproject";
+
+  nativeBuildInputs = [ setuptools ];
+
+  meta = with lib; {
+    description = "Autogenerated and statically check-able pmdsky-debug symbol definitions for Python";
+    homepage = "https://github.com/SkyTemple/pmdsky-debug-py";
+    license = licenses.mit;
+    maintainers = with maintainers; [ marius851000 ];
+  };
+}
diff --git a/pkgs/development/python-modules/py-desmume/default.nix b/pkgs/development/python-modules/py-desmume/default.nix
index 30631de36e524..1ed79995b4eea 100644
--- a/pkgs/development/python-modules/py-desmume/default.nix
+++ b/pkgs/development/python-modules/py-desmume/default.nix
@@ -17,7 +17,7 @@
 
 buildPythonPackage rec {
   pname = "py-desmume";
-  version = "0.0.4.post2";
+  version = "0.0.5.post0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -26,7 +26,7 @@ buildPythonPackage rec {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    hash = "sha256-a819+K/Ovnz53ViDKpUGGjeblWvrAO5ozt/tizdLKCY=";
+    hash = "sha256-q6E7J7e0yXt+jo1KNqqAw2cG/Us+Tw0dLfTqAKWfAlc=";
     fetchSubmodules = true;
   };
 
@@ -64,6 +64,6 @@ buildPythonPackage rec {
     description = "Python library to interface with DeSmuME, the Nintendo DS emulator";
     homepage = "https://github.com/SkyTemple/py-desmume";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ xfix ];
+    maintainers = with maintainers; [ marius851000 xfix ];
   };
 }
diff --git a/pkgs/development/python-modules/range-typed-integers/default.nix b/pkgs/development/python-modules/range-typed-integers/default.nix
new file mode 100644
index 0000000000000..1bb5d7b26f620
--- /dev/null
+++ b/pkgs/development/python-modules/range-typed-integers/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, pytestCheckHook
+, setuptools
+}:
+
+buildPythonPackage rec {
+  pname = "range-typed-integers";
+  version = "1.0.1";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "theCapypara";
+    repo = "range-typed-integers";
+    rev = version;
+    sha256 = "sha256-4+XdalHq6Q2cBbuYi4x7kmCNQh1MwYf+XlLP9FzzzgE=";
+  };
+
+  format = "pyproject";
+
+  nativeBuildInputs = [ setuptools ];
+
+  checkInputs = [ pytestCheckHook ];
+
+  meta = with lib; {
+    description = "A package provides integer types that have a specific range of valid values";
+    homepage = "https://github.com/theCapypara/range-typed-integers";
+    license = [ licenses.mit ];
+    maintainers = with maintainers; [ marius851000 ];
+  };
+}
diff --git a/pkgs/development/python-modules/skytemple-files/default.nix b/pkgs/development/python-modules/skytemple-files/default.nix
index 226cc5295e7f0..b850f694dcf80 100644
--- a/pkgs/development/python-modules/skytemple-files/default.nix
+++ b/pkgs/development/python-modules/skytemple-files/default.nix
@@ -1,16 +1,40 @@
-{ stdenv, lib, buildPythonPackage, fetchFromGitHub, appdirs, dungeon-eos, explorerscript
-, ndspy, pillow, setuptools, skytemple-rust, tilequant, armips
+{ stdenv
+, lib
+, buildPythonPackage
+, fetchFromGitHub
+, appdirs
+, dungeon-eos
+, explorerscript
+, ndspy
+, pillow
+, setuptools
+, skytemple-rust
+, tilequant
+, pyyaml
+, pmdsky-debug-py
+, typing-extensions
+, pythonOlder
+, # optional dependancies for SpriteCollab
+  aiohttp
+, lru-dict
+, graphql-core
+, gql
+, armips
+# tests
+, pytestCheckHook
+, parameterized
+, xmldiff
 }:
 
 buildPythonPackage rec {
   pname = "skytemple-files";
-  version = "1.3.9";
+  version = "1.4.7";
 
   src = fetchFromGitHub {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    hash = "sha256-Z/jbr9o0WKPjkAsfZzxuwAKKdwYV3rLGkUMlMgyC5s0=";
+    hash = "sha256-SLRZ9ThrH2UWqfr5BbjJKDM/SRkCfMNK70XZT4+Ks7w=";
     fetchSubmodules = true;
   };
 
@@ -21,9 +45,37 @@ buildPythonPackage rec {
 
   buildInputs = [ armips ];
 
-  propagatedBuildInputs = [ appdirs dungeon-eos explorerscript ndspy pillow setuptools skytemple-rust tilequant ];
+  propagatedBuildInputs = [
+    appdirs
+    dungeon-eos
+    explorerscript
+    ndspy
+    pillow
+    setuptools
+    skytemple-rust
+    tilequant
+    pyyaml
+    pmdsky-debug-py
+  ] ++ lib.optionals (pythonOlder "3.9") [
+    typing-extensions
+  ];
+
+  passthru.optional-dependencies = {
+    spritecollab = [
+      aiohttp
+      gql
+      graphql-core
+      lru-dict
+    ] ++ gql.optional-dependencies.aiohttp;
+  };
+
+  checkInputs = [ pytestCheckHook parameterized xmldiff ] ++ passthru.optional-dependencies.spritecollab;
+  pytestFlagsArray = "test/";
+  disabledTestPaths = [
+    "test/skytemple_files_test/common/spritecollab/sc_online_test.py"
+    "test/skytemple_files_test/compression_container/atupx/atupx_test.py" # Particularly long test
+  ];
 
-  doCheck = false; # requires Pokémon Mystery Dungeon ROM
   pythonImportsCheck = [ "skytemple_files" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/skytemple-rust/default.nix b/pkgs/development/python-modules/skytemple-rust/default.nix
index 87319d81270b4..e894dec0dec0e 100644
--- a/pkgs/development/python-modules/skytemple-rust/default.nix
+++ b/pkgs/development/python-modules/skytemple-rust/default.nix
@@ -5,27 +5,30 @@
 , libiconv
 , Foundation
 , rustPlatform
-, setuptools-rust }:
+, setuptools-rust
+, range-typed-integers
+}:
 
 buildPythonPackage rec {
   pname = "skytemple-rust";
-  version = "1.3.7";
+  version = "1.4.0.post0";
 
   src = fetchFromGitHub {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    hash = "sha256-rC7KA79va8gZpMKJQ7s3xYdbopNqmWdRYDCbaWaxsR0=";
+    hash = "sha256-aw57B15sDbMcdNPD8MW+O7AdqSSqjlOcuXNSm10GdPM=";
   };
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     name = "${pname}-${version}";
-    hash = "sha256-lXPCxRbaqUC5EfyeBPtJDuGADYOA+DWMaOZRwXppP8E=";
+    hash = "sha256-SvHrMr5k4afVdU5nvg+bcoHVmzHYyoOYqv7nOSVxRCE=";
   };
 
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
   nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
+  propagatedBuildInputs = [ range-typed-integers ];
 
   GETTEXT_SYSTEM = true;
 
diff --git a/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix b/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix
index b394dd1662e99..26479aacdad92 100644
--- a/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix
+++ b/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix
@@ -1,20 +1,31 @@
-{ lib, buildPythonPackage, fetchFromGitHub, gobject-introspection, gtk3, gtksourceview3
-, wrapGAppsHook, nest-asyncio, pycairo, py-desmume, pygtkspellcheck, setuptools
-, skytemple-files, skytemple-icons
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, gobject-introspection
+, gtk3
+, gtksourceview4
+, wrapGAppsHook
+, nest-asyncio
+, pycairo
+, py-desmume
+, pygtkspellcheck
+, setuptools
+, skytemple-files
+, skytemple-icons
 }:
 
 buildPythonPackage rec {
   pname = "skytemple-ssb-debugger";
-  version = "1.3.8.post2";
+  version = "1.4.4";
 
   src = fetchFromGitHub {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    hash = "sha256-dd0qsSNBwxuSopjz2PLqEFddZpvMgeJIjBXY5P6OAow=";
+    hash = "sha256-/LBz0PCQI3QOAmOZk6Jynqi/+NN0w8gbY/S3YckRZ68=";
   };
 
-  buildInputs = [ gobject-introspection gtk3 gtksourceview3 ];
+  buildInputs = [ gobject-introspection gtk3 gtksourceview4 ];
   nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
   propagatedBuildInputs = [
     nest-asyncio
diff --git a/pkgs/development/python-modules/tilequant/default.nix b/pkgs/development/python-modules/tilequant/default.nix
index a72802e2c7b3b..c0d1826935535 100644
--- a/pkgs/development/python-modules/tilequant/default.nix
+++ b/pkgs/development/python-modules/tilequant/default.nix
@@ -9,17 +9,9 @@
 , sortedcollections
 }:
 
-let
-  aikku93-tilequant = fetchFromGitHub {
-    owner = "SkyTemple";
-    repo = "aikku93-tilequant";
-    rev = "6604e0906edff384b6c8d4cde03e6601731f66fd";
-    sha256 = "0w19h3n2i0xriqsy0b0rifjgbv4hqd7gl78fw0cappkrdykij5r1";
-  };
-in
 buildPythonPackage rec {
   pname = "tilequant";
-  version = "0.4.0.post0";
+  version = "0.4.1.post0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -28,13 +20,10 @@ buildPythonPackage rec {
     owner = "SkyTemple";
     repo = pname;
     rev = version;
-    sha256 = "189af203iay3inj1bbgm3hh1fshn879bcm28ypbvfp27fy7j5b25";
+    hash = "sha256-7vU/AYnX7deOH3PjrseRIj9BUJMWzDlwR3UcMpBRyfc=";
+    fetchSubmodules = true;
   };
 
-  postPatch = ''
-    cp -R --no-preserve=mode ${aikku93-tilequant} __aikku93_tilequant
-  '';
-
   buildInputs = [
     gitpython
   ];
@@ -56,6 +45,6 @@ buildPythonPackage rec {
     description = "Tool for quantizing image colors using tile-based palette restrictions";
     homepage = "https://github.com/SkyTemple/tilequant";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ xfix ];
+    maintainers = with maintainers; [ marius851000 xfix ];
   };
 }
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 0910ddca6a357..51fc8c39e4b31 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -7665,6 +7665,8 @@ self: super: with self; {
 
   pmw = callPackage ../development/python-modules/pmw { };
 
+  pmdsky-debug-py = callPackage ../development/python-modules/pmdsky-debug-py { };
+
   pnglatex = callPackage ../development/python-modules/pnglatex { };
 
   pocket = callPackage ../development/python-modules/pocket { };
@@ -10122,6 +10124,8 @@ self: super: with self; {
 
   random2 = callPackage ../development/python-modules/random2 { };
 
+  range-typed-integers = callPackage ../development/python-modules/range-typed-integers { };
+
   rangehttpserver = callPackage ../development/python-modules/rangehttpserver { };
 
   rapidfuzz = callPackage ../development/python-modules/rapidfuzz { };