diff --git a/pkgs/development/python-modules/fireflyalgorithm/default.nix b/pkgs/development/python-modules/fireflyalgorithm/default.nix new file mode 100644 index 000000000000..b0343f2d870a --- /dev/null +++ b/pkgs/development/python-modules/fireflyalgorithm/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "FireflyAlgorithm"; + version = "0.3.2"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "firefly-cpp"; + repo = pname; + rev = version; + sha256 = "sha256-IlOIoP2aANE8y3+Qtb/H6w/+REnPWiUUQGRiAfxOpcM="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + numpy + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "fireflyalgorithm" + ]; + + meta = with lib; { + description = "An implementation of the stochastic nature-inspired algorithm for optimization"; + homepage = "https://github.com/firefly-cpp/FireflyAlgorithm"; + license = licenses.mit; + maintainers = with maintainers; [ firefly-cpp ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5ba002444a9a..35f5393e6261 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3251,6 +3251,8 @@ in { fire = callPackage ../development/python-modules/fire { }; + fireflyalgorithm = callPackage ../development/python-modules/fireflyalgorithm { }; + firetv = callPackage ../development/python-modules/firetv { }; first = callPackage ../development/python-modules/first { };