2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, octave ? null }:
|
2011-05-04 12:04:26 +02:00
|
|
|
|
2018-11-19 14:09:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-23 20:50:23 +02:00
|
|
|
pname = "nlopt";
|
2020-11-26 14:05:25 +01:00
|
|
|
version = "2.7.0";
|
2011-05-04 12:04:26 +02:00
|
|
|
|
2019-04-23 20:50:23 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stevengj";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-26 14:05:25 +01:00
|
|
|
sha256 = "0xm8y9cg5p2vgxbn8wn8gqfpxkbm0m4qsidp0bq1dqs8gvj9017v";
|
2011-05-04 12:04:26 +02:00
|
|
|
};
|
|
|
|
|
2018-11-02 12:44:08 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2014-11-01 21:23:03 +01:00
|
|
|
buildInputs = [ octave ];
|
2013-06-17 12:38:19 +02:00
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-cxx"
|
|
|
|
"--enable-shared"
|
|
|
|
"--with-pic"
|
|
|
|
"--without-guile"
|
|
|
|
"--without-python"
|
|
|
|
"--without-matlab"
|
2021-01-21 18:00:13 +01:00
|
|
|
] ++ lib.optionals (octave != null) [
|
2018-07-25 23:44:21 +02:00
|
|
|
"--with-octave"
|
|
|
|
"M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
|
|
|
|
"OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
|
|
|
|
];
|
2014-11-01 21:23:03 +01:00
|
|
|
|
|
|
|
meta = {
|
2018-11-02 12:44:08 +01:00
|
|
|
homepage = "https://nlopt.readthedocs.io/en/latest/";
|
2014-11-01 21:23:03 +01:00
|
|
|
description = "Free open-source library for nonlinear optimization";
|
2021-01-21 18:00:13 +01:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
hydraPlatforms = lib.platforms.linux;
|
2014-11-01 21:23:03 +01:00
|
|
|
};
|
|
|
|
|
2011-05-04 12:04:26 +02:00
|
|
|
}
|