diff --git a/pkgs/development/python-modules/ihm/default.nix b/pkgs/development/python-modules/ihm/default.nix new file mode 100644 index 000000000000..b56459317f34 --- /dev/null +++ b/pkgs/development/python-modules/ihm/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, swig +, wheel +, msgpack +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ihm"; + version = "0.41"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ihmwg"; + repo = "python-ihm"; + rev = "refs/tags/${version}"; + hash = "sha256-weeOizVWFcOxD45QsvEaoknTofZjglCvidyvXpyRKwc="; + }; + + nativeBuildInputs = [ + setuptools + swig + wheel + ]; + + propagatedBuildInputs = [ + msgpack + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # requires network access + "test_validator_example" + ]; + + pythonImportsCheck = [ "ihm" ]; + + meta = with lib; { + description = "Python package for handling IHM mmCIF and BinaryCIF files"; + homepage = "https://github.com/ihmwg/python-ihm"; + changelog = "https://github.com/ihmwg/python-ihm/blob/${src.rev}/ChangeLog.rst"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/development/python-modules/modelcif/default.nix b/pkgs/development/python-modules/modelcif/default.nix new file mode 100644 index 000000000000..e3bfea707429 --- /dev/null +++ b/pkgs/development/python-modules/modelcif/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, wheel +, ihm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "modelcif"; + version = "0.9"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ihmwg"; + repo = "python-modelcif"; + rev = "refs/tags/${version}"; + hash = "sha256-u+e2QtG6gO1e31OzPfAuzfCkwZymEZMxa2p0haYplAk="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + ihm + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # require network access + "test_validate_mmcif_example" + "test_validate_modbase_example" + ]; + + pythonImportsCheck = [ "modelcif" ]; + + meta = with lib; { + description = "Python package for handling ModelCIF mmCIF and BinaryCIF files"; + homepage = "https://github.com/ihmwg/python-modelcif"; + changelog = "https://github.com/ihmwg/python-modelcif/blob/${src.rev}/ChangeLog.rst"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 468a5a4dc73a..18fc342e3bb1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5214,6 +5214,8 @@ self: super: with self; { inherit (pkgs) igraph; }; + ihm = callPackage ../development/python-modules/ihm { }; + iisignature = callPackage ../development/python-modules/iisignature { }; ijson = callPackage ../development/python-modules/ijson { }; @@ -6894,6 +6896,8 @@ self: super: with self; { model-bakery = callPackage ../development/python-modules/model-bakery { }; + modelcif = callPackage ../development/python-modules/modelcif { }; + modeled = callPackage ../development/python-modules/modeled { }; moderngl = callPackage ../development/python-modules/moderngl { };