diff --git a/pkgs/development/python-modules/srctools/default.nix b/pkgs/development/python-modules/srctools/default.nix new file mode 100644 index 000000000000..117a97e5b39a --- /dev/null +++ b/pkgs/development/python-modules/srctools/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + meson, + meson-python, + cython_3_1, + attrs, + useful-types, + pytestCheckHook, + pillow, + pytest-regressions, + dirty-equals, +}: +let + pname = "srctools"; + version = "2.6.0"; +in +buildPythonPackage { + inherit pname version; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-QHPRSgu3i443kLeLeJXVpPP0hqMbsi4lScAYHrrfWEM="; + }; + + build-system = [ + meson + meson-python + cython_3_1 + ]; + + dependencies = [ + attrs + useful-types + ]; + + nativeCheckInputs = [ + pytestCheckHook + pillow + pytest-regressions + dirty-equals + ]; + + pythonImportsCheck = [ "srctools" ]; + + meta = { + description = "Modules for working with Valve's Source Engine file formats"; + homepage = "https://github.com/TeamSpen210/srctools"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ different-name ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6c334e2c6269..a24f1ba6ed46 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17150,6 +17150,8 @@ self: super: with self; { squarify = callPackage ../development/python-modules/squarify { }; + srctools = callPackage ../development/python-modules/srctools { }; + sre-yield = callPackage ../development/python-modules/sre-yield { }; srp = callPackage ../development/python-modules/srp { };