1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, poetry-core
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "FireflyAlgorithm";
12 version = "0.3.4";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "firefly-cpp";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-rJOcPQU/oz/qP787OpZsfbjSsT2dWvhJLTs4N5TriWc=";
22 };
23
24 nativeBuildInputs = [
25 poetry-core
26 ];
27
28 propagatedBuildInputs = [
29 numpy
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "fireflyalgorithm"
38 ];
39
40 meta = with lib; {
41 description = "An implementation of the stochastic nature-inspired algorithm for optimization";
42 homepage = "https://github.com/firefly-cpp/FireflyAlgorithm";
43 changelog = "https://github.com/firefly-cpp/FireflyAlgorithm/blob/${version}/CHANGELOG.md";
44 license = licenses.mit;
45 maintainers = with maintainers; [ firefly-cpp ];
46 };
47}