2019-06-16 20:59:06 +01:00
|
|
|
{ fetchFromGitHub
|
2021-01-21 17:00:13 +00:00
|
|
|
, lib, stdenv
|
2018-08-10 21:42:52 +01:00
|
|
|
, cmake
|
|
|
|
, eigen
|
|
|
|
, nlopt
|
|
|
|
, ipopt
|
|
|
|
, boost
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pagmo2";
|
2018-12-02 16:11:38 +00:00
|
|
|
version = "2.9";
|
2018-08-10 21:42:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esa";
|
|
|
|
repo = "pagmo2";
|
|
|
|
rev = "v${version}";
|
2018-12-02 16:11:38 +00:00
|
|
|
sha256 = "0al2i59m5qr83wz5n5408zvys0b3mc40rszf0l5b9a0gp1axj400";
|
2018-08-10 21:42:52 +01:00
|
|
|
};
|
|
|
|
|
2018-12-02 16:11:38 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ eigen nlopt ipopt boost ];
|
2018-08-10 21:42:52 +01:00
|
|
|
|
2018-12-02 16:11:38 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DPAGMO_BUILD_TESTS=no"
|
|
|
|
"-DPAGMO_WITH_EIGEN3=yes"
|
|
|
|
"-DPAGMO_WITH_NLOPT=yes"
|
|
|
|
"-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt.so"
|
|
|
|
"-DPAGMO_WITH_IPOPT=yes"
|
|
|
|
"-DCMAKE_CXX_FLAGS='-fuse-ld=gold'"
|
|
|
|
];
|
2018-08-10 21:42:52 +01:00
|
|
|
|
2018-12-02 16:11:38 +00:00
|
|
|
# tests pass but take 30+ minutes
|
2018-08-10 21:42:52 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://esa.github.io/pagmo2/";
|
2018-08-10 21:42:52 +01:00
|
|
|
description = "Scientific library for massively parallel optimization";
|
2018-12-02 16:11:38 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
2018-08-10 21:42:52 +01:00
|
|
|
};
|
|
|
|
}
|