2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
niapy,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
scikit-learn,
|
|
|
|
toml-adapt,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "niaclass";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.2.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lukapecnik";
|
|
|
|
repo = "NiaClass";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-C3EF18lzheE+dXHJA6WJNFECAH4HfPiCDo7QxtHvOLI=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pandas" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-04-12 12:48:02 +00:00
|
|
|
toml-adapt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
niapy
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
scikit-learn
|
|
|
|
];
|
|
|
|
|
|
|
|
# create scikit-learn dep version consistent
|
|
|
|
preBuild = ''
|
|
|
|
toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "niaclass" ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A framework for solving classification tasks using Nature-inspired algorithms";
|
|
|
|
homepage = "https://github.com/lukapecnik/NiaClass";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/lukapecnik/NiaClass/releases/tag/${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ firefly-cpp ];
|
|
|
|
};
|
|
|
|
}
|