diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 73f13c11a7db..428d97eaf794 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -2,8 +2,11 @@ libX11, graphicsmagick, pcre, liblapack, texLive, pkgconfig, mesa, fltk, fftw, fftwSinglePrec, zlib, curl, qrupdate }: +let + version = "3.6.4"; +in stdenv.mkDerivation rec { - name = "octave-3.6.4"; + name = "octave-${version}"; src = fetchurl { url = "mirror://gnu/octave/${name}.tar.bz2"; sha256 = "0qn9s7jrjmrn6w3rvp8d7vfnymyv0spnxzrp9l7p8p8zb7wms67s"; @@ -27,6 +30,11 @@ stdenv.mkDerivation rec { cp test/fntests.log $out/share/octave/${name}-fntests.log ''; + passthru = { + inherit version; + sitePath = "share/octave/${version}/site"; + }; + meta = { homepage = http://octave.org/; license = "GPLv3+"; diff --git a/pkgs/development/libraries/nlopt/default.nix b/pkgs/development/libraries/nlopt/default.nix index 0936332cd489..cc216a59d758 100644 --- a/pkgs/development/libraries/nlopt/default.nix +++ b/pkgs/development/libraries/nlopt/default.nix @@ -1,12 +1,19 @@ -{ fetchurl, stdenv }: +{ fetchurl, stdenv +, withOctave ? true, octave ? null}: stdenv.mkDerivation rec { - name = "nlopt-2.2.1"; + name = "nlopt-2.3"; src = fetchurl { url = "http://ab-initio.mit.edu/nlopt/${name}.tar.gz"; - sha256 = "0p7ri7dcp6vga7jwng7wj9bf2ixk6p5ldxp76r93xkrdixqfngaq"; + sha256 = "1iw2cjgypyqz779f47fz0nmifbrvk4zs4rxi1ibk36f4ly3wg6p6"; }; - configureFlags = "--with-cxx --with-pic --without-guile --without-python --without-octave --without-matlab"; + buildInputs = stdenv.lib.optional withOctave octave; + + configureFlags = "--with-cxx --enable-shared --with-pic --without-guile --without-python + --without-matlab " + + stdenv.lib.optionalString withOctave ("--with-octave " + + "M_INSTALL_DIR=$(out)/${octave.sitePath}/m " + + "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct "); }