2018-08-10 21:43:58 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, eigen
|
|
|
|
, nlopt
|
|
|
|
, ipopt
|
|
|
|
, boost
|
|
|
|
, pagmo2
|
|
|
|
, numpy
|
|
|
|
, cloudpickle
|
|
|
|
, ipyparallel
|
|
|
|
, numba
|
2018-12-02 16:21:50 +00:00
|
|
|
, python
|
2018-08-10 21:43:58 +01: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
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
in buildPythonPackage {
|
2018-08-10 21:43:58 +01:00
|
|
|
pname = "pygmo";
|
2018-12-02 16:21:50 +00:00
|
|
|
version = pagmo2WithPython.version;
|
2018-08-10 21:43:58 +01:00
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
inherit propagatedBuildInputs;
|
2018-08-10 21:43:58 +01:00
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
src = pagmo2WithPython;
|
2018-08-10 21:43:58 +01:00
|
|
|
|
|
|
|
preBuild = ''
|
2018-12-02 16:21:50 +00:00
|
|
|
mv ${python.sitePackages}/pygmo wheel
|
2018-08-10 21:43:58 +01:00
|
|
|
cd wheel
|
|
|
|
'';
|
|
|
|
|
|
|
|
# dont do tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-12-02 16:21:50 +00:00
|
|
|
meta = with lib; {
|
2018-08-10 21:43:58 +01: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 21:43:58 +01:00
|
|
|
};
|
|
|
|
}
|