2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-09-11 15:47:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-25 14:12:00 +00:00
|
|
|
pname = "fireflyalgorithm";
|
|
|
|
version = "0.4.4";
|
|
|
|
pyproject = true;
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "firefly-cpp";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "FireflyAlgorithm";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-xsTgSHBtN4gGw+9YvprcLubnCXSNRdn4abcz391cMEE=";
|
2022-09-11 15:47:08 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "fireflyalgorithm" ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An implementation of the stochastic nature-inspired algorithm for optimization";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "firefly-algorithm";
|
2022-09-11 15:47:08 +00:00
|
|
|
homepage = "https://github.com/firefly-cpp/FireflyAlgorithm";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/firefly-cpp/FireflyAlgorithm/blob/${version}/CHANGELOG.md";
|
2022-09-11 15:47:08 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ firefly-cpp ];
|
|
|
|
};
|
|
|
|
}
|