From def307e476da03fa282633abfabfb45578700347 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 10 Aug 2018 16:42:52 -0400 Subject: [PATCH] pagmo2: init at 2.8 - c++ headers for library - parallel optimization framework - all tests but 1/55 pass so skipping tests --- pkgs/development/libraries/pagmo2/default.nix | 46 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/libraries/pagmo2/default.nix diff --git a/pkgs/development/libraries/pagmo2/default.nix b/pkgs/development/libraries/pagmo2/default.nix new file mode 100644 index 000000000000..367cef46dc44 --- /dev/null +++ b/pkgs/development/libraries/pagmo2/default.nix @@ -0,0 +1,46 @@ +{ lib +, fetchFromGitHub +, stdenv +, cmake +, eigen +, nlopt +, ipopt +, boost +, writeText +}: + +stdenv.mkDerivation rec { + name = "pagmo2-${version}"; + version = "2.8"; + + src = fetchFromGitHub { + owner = "esa"; + repo = "pagmo2"; + rev = "v${version}"; + sha256 = "1xwxamcn3fkwr62jn6bkanrwy0cvsksf75hfwx4fvl56awnbz41z"; + }; + + buildInputs = [ cmake eigen nlopt ipopt boost ]; + + preBuild = '' + cp -r $src/* . + ''; + + cmakeFlags = [ "-DPAGMO_BUILD_TESTS=no" + "-DPAGMO_WITH_EIGEN3=yes" "-DPAGMO_WITH_NLOPT=yes" + "-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt_cxx.so" "-DPAGMO_WITH_IPOPT=yes" + "-DCMAKE_CXX_FLAGS='-fuse-ld=gold'" ]; + + checkPhase = '' + ctest + ''; + + # All but one test pass skip for now (tests also take about 30 min to compile) + doCheck = false; + + meta = { + homepage = https://esa.github.io/pagmo2/; + description = "Scientific library for massively parallel optimization"; + license = stdenv.lib.licenses.gpl3Plus; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1340020d5b9c..a4a6f2cbd669 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4419,6 +4419,8 @@ with pkgs; padthv1 = callPackage ../applications/audio/padthv1 { }; + pagmo2 = callPackage ../development/libraries/pagmo2 { }; + pakcs = callPackage ../development/compilers/pakcs {}; pal = callPackage ../tools/misc/pal { };