about summary refs log tree commit diff
path: root/pkgs/development/python-modules/biom-format/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/biom-format/default.nix')
-rw-r--r--pkgs/development/python-modules/biom-format/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/biom-format/default.nix b/pkgs/development/python-modules/biom-format/default.nix
new file mode 100644
index 0000000000000..8588c88e97af6
--- /dev/null
+++ b/pkgs/development/python-modules/biom-format/default.nix
@@ -0,0 +1,61 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  setuptools,
+  cython,
+  click,
+  numpy,
+  scipy,
+  pandas,
+  h5py,
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "biom-format";
+  version = "2.1.16";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "biocore";
+    repo = "biom-format";
+    rev = "refs/tags/${version}";
+    hash = "sha256-E/6dIN8tdsu6cBVBW/BOeAQwJB9XRRL3flQZSKqIZlc=";
+  };
+
+  build-system = [
+    setuptools
+    cython
+    numpy
+  ];
+
+  dependencies = [
+    click
+    numpy
+    scipy
+    pandas
+    h5py
+  ];
+
+  # make pytest resolve the package from $out
+  # some tests don't work if we change the level of directory nesting
+  preCheck = ''
+    mkdir biom_tests
+    mv biom/tests biom_tests/tests
+    rm -r biom
+  '';
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  pytestFlagsArray = [ "biom_tests/tests" ];
+
+  pythonImportsCheck = [ "biom" ];
+
+  meta = {
+    homepage = "http://biom-format.org/";
+    description = "Biological Observation Matrix (BIOM) format";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ tomasajt ];
+  };
+}