2018-08-10 20:43:58 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, eigen
|
|
|
|
, nlopt
|
|
|
|
, ipopt
|
|
|
|
, boost
|
|
|
|
, pagmo2
|
|
|
|
, numpy
|
|
|
|
, cloudpickle
|
|
|
|
, ipyparallel
|
|
|
|
, numba
|
2018-12-02 16:21:50 +00:00
|
|
|
, python
|
2018-08-10 20:43:58 +00:00
|
|
|
}:
|
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
let
|
|
|
|
propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ];
|
|
|
|
|
|
|
|
pagmo2WithPython = pagmo2.overrideAttrs (oldAttrs: {
|
|
|
|
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
|
|
|
"-DPAGMO_BUILD_PYGMO=yes"
|
|
|
|
"-DPAGMO_BUILD_PAGMO=no"
|
|
|
|
"-DPagmo_DIR=${pagmo2}"
|
|
|
|
];
|
|
|
|
buildInputs = [ eigen nlopt ipopt boost pagmo2 ] ++ propagatedBuildInputs;
|
|
|
|
postInstall = ''
|
|
|
|
mv wheel $out
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
in buildPythonPackage rec {
|
2018-08-10 20:43:58 +00:00
|
|
|
pname = "pygmo";
|
2018-12-02 16:21:50 +00:00
|
|
|
version = pagmo2WithPython.version;
|
2018-08-10 20:43:58 +00:00
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
inherit propagatedBuildInputs;
|
2018-08-10 20:43:58 +00:00
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
src = pagmo2WithPython;
|
2018-08-10 20:43:58 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
2018-12-02 16:21:50 +00:00
|
|
|
mv ${python.sitePackages}/pygmo wheel
|
2018-08-10 20:43:58 +00:00
|
|
|
cd wheel
|
|
|
|
'';
|
|
|
|
|
|
|
|
# dont do tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
meta = with lib; {
|
2018-08-10 20:43:58 +00:00
|
|
|
description = "Parallel optimisation for Python";
|
|
|
|
homepage = https://esa.github.io/pagmo2/;
|
2018-12-02 16:21:50 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
2018-08-10 20:43:58 +00:00
|
|
|
};
|
|
|
|
}
|