diff --git a/pkgs/development/python-modules/biopandas/default.nix b/pkgs/development/python-modules/biopandas/default.nix new file mode 100644 index 000000000000..d33a9faf4403 --- /dev/null +++ b/pkgs/development/python-modules/biopandas/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, looseversion +, mmtf-python +, nose +, numpy +, pandas +, pythonRelaxDepsHook +}: + +buildPythonPackage rec { + pname = "biopandas"; + version = "0.4.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "BioPandas"; + repo = "biopandas"; + rev = "refs/tags/v${version}"; + hash = "sha256-PRdemBo+bB2xJWmF2NylFTfNwEEo67i6XSaeDAFmQ/c="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "looseversion" + ]; + + propagatedBuildInputs = [ + numpy + pandas + mmtf-python + looseversion + ]; + + nativeCheckInputs = [ + nose + ]; + + checkPhase = '' + runHook preCheck + + nosetests + + runHook postCheck + ''; + + pythonImportsCheck = [ + "biopandas" + ]; + + meta = { + description = "Working with molecular structures in pandas DataFrames"; + homepage = "https://github.com/BioPandas/biopandas"; + changelog = "https://github.com/BioPandas/biopandas/releases/tag/${src.rev}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/development/python-modules/mmtf-python/default.nix b/pkgs/development/python-modules/mmtf-python/default.nix new file mode 100644 index 000000000000..197d0cf3e65b --- /dev/null +++ b/pkgs/development/python-modules/mmtf-python/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchPypi +, msgpack +, numpy +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "mmtf-python"; + version = "1.1.3"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-EqAv4bcTHworjORbRvHgzdKLmBj+RJlVTCaISYfqDDI="; + }; + + propagatedBuildInputs = [ + msgpack + numpy + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + unittestFlagsArray = [ + "-s mmtf/tests" + "-p \"*_tests.py\"" + ]; + + pythonImportsCheck = [ + "mmtf" + ]; + + meta = { + description = "The python implementation of the MMTF API, decoder and encoder"; + homepage = "https://github.com/rcsb/mmtf-python"; + changelog = "https://github.com/rcsb/mmtf-python/releases/tag/v${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3b1fd05cb344..ec7cf76504c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1326,6 +1326,8 @@ self: super: with self; { binwalk-full = self.binwalk.override { visualizationSupport = true; }; + biopandas = callPackage ../development/python-modules/biopandas { }; + biopython = callPackage ../development/python-modules/biopython { }; biplist = callPackage ../development/python-modules/biplist { }; @@ -6397,6 +6399,8 @@ self: super: with self; { mmpython = callPackage ../development/python-modules/mmpython { }; + mmtf-python = callPackage ../development/python-modules/mmtf-python { }; + mnemonic = callPackage ../development/python-modules/mnemonic { }; mne-python = callPackage ../development/python-modules/mne-python { };