2018-11-02 11:44:08 +00:00
|
|
|
{ fetchurl, stdenv, octave ? null, cmake }:
|
2011-05-04 11:04:26 +01:00
|
|
|
|
2018-11-19 13:09:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-11-02 11:44:08 +00:00
|
|
|
name = "nlopt-${version}";
|
2018-11-19 13:09:33 +00:00
|
|
|
version = "2.5.0";
|
2011-05-04 11:04:26 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-02 11:44:08 +00:00
|
|
|
url = "https://github.com/stevengj/nlopt/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "1bmlsdzkw8xbigiihffyb0kdaqbyfn7dr8s5pdgavy7z05bpmpf6";
|
2011-05-04 11:04:26 +01:00
|
|
|
};
|
|
|
|
|
2018-11-02 11:44:08 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2014-11-01 20:23:03 +00:00
|
|
|
buildInputs = [ octave ];
|
2013-06-17 11:38:19 +01:00
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-cxx"
|
|
|
|
"--enable-shared"
|
|
|
|
"--with-pic"
|
|
|
|
"--without-guile"
|
|
|
|
"--without-python"
|
|
|
|
"--without-matlab"
|
|
|
|
] ++ stdenv.lib.optionals (octave != null) [
|
|
|
|
"--with-octave"
|
|
|
|
"M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
|
|
|
|
"OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
|
|
|
|
];
|
2014-11-01 20:23:03 +00:00
|
|
|
|
|
|
|
meta = {
|
2018-11-02 11:44:08 +00:00
|
|
|
homepage = "https://nlopt.readthedocs.io/en/latest/";
|
2014-11-01 20:23:03 +00:00
|
|
|
description = "Free open-source library for nonlinear optimization";
|
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
|
|
|
hydraPlatforms = stdenv.lib.platforms.linux;
|
2017-03-06 09:25:56 +00:00
|
|
|
broken = (octave != null); # cannot cope with Octave 4.x
|
2014-11-01 20:23:03 +00:00
|
|
|
};
|
|
|
|
|
2011-05-04 11:04:26 +01:00
|
|
|
}
|