1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, python
6}:
7
8buildPythonPackage rec {
9 pname = "cma";
10 version = "3.1.0";
11
12 src = fetchFromGitHub {
13 owner = "CMA-ES";
14 repo = "pycma";
15 rev = "r${version}";
16 sha256 = "1bal4kljxrdm6x5ppyi6i109714h0czdxfsna906dlfplrmq52bf";
17 };
18
19 propagatedBuildInputs = [
20 numpy
21 ];
22
23 checkPhase = ''
24 ${python.executable} -m cma.test
25 '';
26
27 meta = with lib; {
28 description = "CMA-ES, Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization in Python";
29 homepage = "https://github.com/CMA-ES/pycma";
30 license = licenses.bsd3;
31 maintainers = [ maintainers.costrouc ];
32 };
33}