nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 17.09 27 lines 876 B view raw
1{ fetchurl, stdenv, octave ? null }: 2 3stdenv.mkDerivation rec { 4 name = "nlopt-2.4.2"; 5 6 src = fetchurl { 7 url = "http://ab-initio.mit.edu/nlopt/${name}.tar.gz"; 8 sha256 = "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0"; 9 }; 10 11 buildInputs = [ octave ]; 12 13 configureFlags = "--with-cxx --enable-shared --with-pic --without-guile --without-python 14 --without-matlab " + 15 stdenv.lib.optionalString (octave != null) ("--with-octave " + 16 "M_INSTALL_DIR=$(out)/${octave.sitePath}/m " + 17 "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct "); 18 19 meta = { 20 homepage = http://ab-initio.mit.edu/nlopt/; 21 description = "Free open-source library for nonlinear optimization"; 22 license = stdenv.lib.licenses.lgpl21Plus; 23 hydraPlatforms = stdenv.lib.platforms.linux; 24 broken = (octave != null); # cannot cope with Octave 4.x 25 }; 26 27}