blob: f077f929ec5809b7aca233205e80c1e1c90a9651 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
numpy,
poetry-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fireflyalgorithm";
version = "0.4.6";
pyproject = true;
src = fetchFromGitHub {
owner = "firefly-cpp";
repo = "FireflyAlgorithm";
tag = version;
hash = "sha256-NMmwjKtIk8KR0YXXSXkJhiQsbjMusaLnstUWx0izCNA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'numpy = "^1.26.1"' ""
'';
build-system = [ poetry-core ];
dependencies = [ numpy ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "fireflyalgorithm" ];
meta = {
description = "Implementation of the stochastic nature-inspired algorithm for optimization";
mainProgram = "firefly-algorithm";
homepage = "https://github.com/firefly-cpp/FireflyAlgorithm";
changelog = "https://github.com/firefly-cpp/FireflyAlgorithm/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ firefly-cpp ];
};
}
|