2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, apricot-select
|
|
|
|
, networkx
|
2021-05-20 23:08:51 +00:00
|
|
|
, numpy
|
2024-01-13 08:15:51 +00:00
|
|
|
, scikit-learn
|
2021-05-20 23:08:51 +00:00
|
|
|
, scipy
|
2024-01-13 08:15:51 +00:00
|
|
|
, torch
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pomegranate";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.0.0";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = "jmschrei";
|
2022-06-16 17:23:12 +00:00
|
|
|
# no tags for recent versions: https://github.com/jmschrei/pomegranate/issues/974
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-EnxKlRRfsOIDLAhYOq7bUSbI/NvPoSyYCZ9D5VCXFGQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
apricot-select
|
|
|
|
networkx
|
|
|
|
numpy
|
|
|
|
scikit-learn
|
|
|
|
scipy
|
|
|
|
torch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Probabilistic and graphical models for Python, implemented in cython for speed";
|
|
|
|
homepage = "https://github.com/jmschrei/pomegranate";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rybern ];
|
|
|
|
};
|
|
|
|
}
|