2019-06-16 20:59:06 +01:00
|
|
|
{ fetchFromGitHub
|
2018-08-10 21:42:52 +01:00
|
|
|
, stdenv
|
|
|
|
, cmake
|
|
|
|
, eigen
|
|
|
|
, nlopt
|
|
|
|
, ipopt
|
|
|
|
, boost
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pagmo2-${version}";
|
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;
|
|
|
|
|
2018-12-02 16:11:38 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-08-10 21:42:52 +01:00
|
|
|
homepage = https://esa.github.io/pagmo2/;
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|