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
|
2022-02-26 16:25:33 +00:00
|
|
|
, tbb
|
2018-08-10 21:42:52 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pagmo2";
|
2022-02-26 16:25:33 +00:00
|
|
|
version = "2.18.0";
|
2018-08-10 21:42:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esa";
|
|
|
|
repo = "pagmo2";
|
|
|
|
rev = "v${version}";
|
2022-02-26 16:25:33 +00:00
|
|
|
sha256 = "0rd8scs4hj6qd8ylmn5hafncml2vr4fvcgm3agz3jrvmnc7hadrj";
|
2018-08-10 21:42:52 +01:00
|
|
|
};
|
|
|
|
|
2018-12-02 16:11:38 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-02-26 16:25:33 +00:00
|
|
|
buildInputs = [ eigen nlopt ipopt boost tbb ];
|
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
|
|
|
};
|
|
|
|
}
|