2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
niapy,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
scikit-learn,
|
|
|
|
toml-adapt,
|
2022-11-04 12:27:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "niaaml";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.1.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-11-04 12:27:35 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-07-27 06:49:29 +00:00
|
|
|
owner = "firefly-cpp";
|
2022-11-04 12:27:35 +00:00
|
|
|
repo = "NiaAML";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-VMZLEirE01Q9eyQIhV18PepGWmBcxLIwNeuVf7EuSWE=";
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pandas" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
toml-adapt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
niapy
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
scikit-learn
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# create scikit-learn and niapy deps version consistent
|
2022-11-04 12:27:35 +00:00
|
|
|
preBuild = ''
|
|
|
|
toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X
|
2023-05-24 13:37:59 +00:00
|
|
|
toml-adapt -path pyproject.toml -a change -dep niapy -ver X
|
2022-11-04 12:27:35 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "niaaml" ];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python automated machine learning framework";
|
2024-07-27 06:49:29 +00:00
|
|
|
homepage = "https://github.com/firefly-cpp/NiaAML";
|
|
|
|
changelog = "https://github.com/firefly-cpp/NiaAML/releases/tag/${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ firefly-cpp ];
|
|
|
|
};
|
|
|
|
}
|