Merge pull request #161980 from aanderse/ipopt

ipopt: 3.12.13 -> 3.14.5
main
markuskowa 2 years ago committed by GitHub
commit 684c73c9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      pkgs/development/libraries/nlopt/default.nix
  2. 7
      pkgs/development/libraries/pagmo2/default.nix
  3. 29
      pkgs/development/libraries/science/math/ipopt/default.nix
  4. 37
      pkgs/development/libraries/science/math/libamplsolver/default.nix
  5. 79
      pkgs/development/python-modules/pygmo/default.nix
  6. 2
      pkgs/top-level/all-packages.nix

@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
"OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
];
postFixup = ''
substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
'';
meta = {
homepage = "https://nlopt.readthedocs.io/en/latest/";
description = "Free open-source library for nonlinear optimization";

@ -5,21 +5,22 @@
, nlopt
, ipopt
, boost
, tbb
}:
stdenv.mkDerivation rec {
pname = "pagmo2";
version = "2.9";
version = "2.18.0";
src = fetchFromGitHub {
owner = "esa";
repo = "pagmo2";
rev = "v${version}";
sha256 = "0al2i59m5qr83wz5n5408zvys0b3mc40rszf0l5b9a0gp1axj400";
sha256 = "0rd8scs4hj6qd8ylmn5hafncml2vr4fvcgm3agz3jrvmnc7hadrj";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ eigen nlopt ipopt boost ];
buildInputs = [ eigen nlopt ipopt boost tbb ];
cmakeFlags = [
"-DPAGMO_BUILD_TESTS=no"

@ -1,26 +1,35 @@
{ lib, stdenv, fetchurl, unzip, blas, lapack, gfortran }:
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, blas
, lapack
, gfortran
, enableAMPL ? stdenv.isLinux, libamplsolver
}:
assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation rec {
pname = "ipopt";
version = "3.12.13";
version = "3.14.5";
src = fetchurl {
url = "https://www.coin-or.org/download/source/Ipopt/Ipopt-${version}.zip";
sha256 = "0kzf05aypx8q5mr3sciclk926ans0yi2d2chjdxxgpi3sza609dx";
src = fetchFromGitHub {
owner = "coin-or";
repo = "Ipopt";
rev = "releases/${version}";
sha256 = "sha256-eqOacZGuuGAjWMs2H6RntQ+WJmGTi+EqydHUQXEpY54=";
};
CXXDEFS = [ "-DHAVE_RAND" "-DHAVE_CSTRING" "-DHAVE_CSTDIO" ];
configureFlags = [
"--with-blas-lib=-lblas"
"--with-lapack-lib=-llapack"
"--with-asl-cflags=-I${libamplsolver}/include"
"--with-asl-lflags=-lamplsolver"
];
nativeBuildInputs = [ unzip gfortran ];
buildInputs = [ blas lapack ];
nativeBuildInputs = [ pkg-config gfortran ];
buildInputs = [ blas lapack ] ++ lib.optionals enableAMPL [ libamplsolver ];
enableParallelBuilding = true;

@ -0,0 +1,37 @@
{ lib, stdenv, fetchurl, fetchpatch }:
stdenv.mkDerivation rec {
pname = "libamplsolver";
version = "20211109";
src = fetchurl {
url = "https://ampl.com/netlib/ampl/solvers.tgz";
sha256 = "sha256-LVmScuIvxmZzywPSBl9T9YcUBJP7UFAa3eWs9r4q3JM=";
};
patches = [
# Debian provides a patch to build a shared library
(fetchpatch {
url = "https://sources.debian.org/data/main/liba/libamplsolver/0~20190702-2/debian/patches/fix-makefile-shared-lib.patch";
sha256 = "sha256-96qwj3fLugzbsfxguKMce13cUo7XGC4VUE7xKcJs42Y=";
})
];
installPhase = ''
runHook preInstall
pushd sys.`uname -m`.`uname -s`
install -D -m 0644 *.h -t $out/include
install -D -m 0644 *.so* -t $out/lib
install -D -m 0644 *.a -t $out/lib
popd
runHook postInstall
'';
meta = with lib; {
description = "A library of routines that help solvers work with AMPL";
homepage = "https://ampl.com/netlib/ampl/";
license = [ licenses.mit ];
platforms = platforms.linux;
maintainers = with maintainers; [ aanderse ];
};
}

@ -1,52 +1,63 @@
{ lib
, buildPythonPackage
, stdenv
, toPythonModule
, fetchFromGitHub
, cmake
, boost
, eigen
, nlopt
, ipopt
, boost
, nlopt
, pagmo2
, numpy
, python
, cloudpickle
, ipyparallel
, numba
, python
, numpy
, pybind11
}:
let
propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ];
pagmo2WithPython = pagmo2.overrideAttrs (oldAttrs: {
cmakeFlags = oldAttrs.cmakeFlags ++ [
"-DPAGMO_BUILD_PYGMO=yes"
"-DPAGMO_BUILD_PAGMO=no"
"-DPagmo_DIR=${pagmo2}"
];
buildInputs = [ eigen nlopt ipopt boost pagmo2 ] ++ propagatedBuildInputs;
postInstall = ''
mv wheel $out
'';
});
in buildPythonPackage {
toPythonModule (stdenv.mkDerivation rec {
pname = "pygmo";
version = pagmo2WithPython.version;
inherit propagatedBuildInputs;
version = "2.18.0";
src = pagmo2WithPython;
preBuild = ''
mv ${python.sitePackages}/pygmo wheel
cd wheel
'';
src = fetchFromGitHub {
owner = "esa";
repo = "pygmo2";
rev = "v${version}";
sha256 = "sha256-he7gxRRJd6bBrD0Z0i+CQTr5JH4P3Im/beNGO+HfmNM=";
};
# dont do tests
doCheck = false;
cmakeFlags = [
"-DPYGMO_INSTALL_PATH=${placeholder "out"}/lib/${python.libPrefix}/site-packages"
];
nativeBuildInputs = [
cmake
];
propagatedBuildInputs = [
cloudpickle
ipyparallel
numba
numpy
python
];
buildInputs = [
boost
eigen
ipopt
nlopt
pagmo2
pybind11
];
doCheck = true;
meta = with lib; {
description = "Parallel optimisation for Python";
homepage = "https://esa.github.io/pagmo2/";
homepage = "https://github.com/esa/pygmo2";
license = licenses.gpl3Plus;
maintainers = [ maintainers.costrouc ];
};
}
})

@ -32123,6 +32123,8 @@ with pkgs;
lapack-reference = callPackage ../development/libraries/science/math/liblapack { };
liblapack = lapack-reference;
libamplsolver = callPackage ../development/libraries/science/math/libamplsolver { };
libbraiding = callPackage ../development/libraries/science/math/libbraiding { };
libhomfly = callPackage ../development/libraries/science/math/libhomfly { };

Loading…
Cancel
Save