about summary refs log tree commit diff
path: root/pkgs/development/python-modules/flowmc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/flowmc/default.nix')
-rw-r--r--pkgs/development/python-modules/flowmc/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/flowmc/default.nix b/pkgs/development/python-modules/flowmc/default.nix
new file mode 100644
index 000000000000..27127b93b578
--- /dev/null
+++ b/pkgs/development/python-modules/flowmc/default.nix
@@ -0,0 +1,60 @@
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+
+  # build-system
+  setuptools,
+
+  # dependencies
+  corner,
+  equinox,
+  evosax,
+  jax,
+  jaxlib,
+  optax,
+  tqdm,
+
+  # checks
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "flowmc";
+  version = "0.3.4";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchFromGitHub {
+    owner = "kazewong";
+    repo = "flowMC";
+    rev = "refs/tags/flowMC-${version}";
+    hash = "sha256-unvbNs0AOzW4OI+9y6KxoBC5yEjEz+q0PZblQLXCC/Y=";
+  };
+
+  build-system = [ setuptools ];
+
+  dependencies = [
+    corner
+    equinox
+    evosax
+    jax
+    jaxlib
+    optax
+    tqdm
+  ];
+
+  pythonImportsCheck = [ "flowMC" ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  meta = {
+    description = "Normalizing-flow enhanced sampling package for probabilistic inference in Jax";
+    homepage = "https://github.com/kazewong/flowMC";
+    changelog = "https://github.com/kazewong/flowMC/releases/tag/flowMC-${version}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ GaetanLepage ];
+  };
+}