osi: init at 0.108.4

This commit is contained in:
Nikolay Amiantov 2019-06-22 02:22:14 +03:00
parent a92611508f
commit 08b1d81089
2 changed files with 44 additions and 0 deletions

@ -0,0 +1,42 @@
{ stdenv, lib, fetchurl, gfortran, pkgconfig
, blas, zlib, bzip2
, withGurobi ? false, gurobi
, withCplex ? false, cplex }:
stdenv.mkDerivation rec {
pname = "osi";
version = "0.108.4";
src = fetchurl {
url = "https://www.coin-or.org/download/source/Osi/Osi-${version}.tgz";
sha256 = "13bwhdh01g37vp3kjwl9nvij5s5ikh5f7zgrqgwrqfyk35q2x9s5";
};
buildInputs =
[ blas zlib bzip2 ]
++ lib.optional withGurobi gurobi
++ lib.optional withCplex cplex;
nativeBuildInputs = [ gfortran pkgconfig ];
configureFlags =
lib.optionals withGurobi [ "--with-gurobi-incdir=${gurobi}/include" "--with-gurobi-lib=-lgurobi${gurobi.libSuffix}" ]
++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ];
NIX_LDFLAGS =
lib.optional withCplex "-L${cplex}/cplex/bin/${cplex.libArch}";
# Compile errors
NIX_CFLAGS_COMPILE = [ "-Wno-cast-qual" ];
hardeningDisable = [ "format" ];
enableParallelBuilding = true;
passthru = { inherit withGurobi withCplex; };
meta = with stdenv.lib; {
description = "An abstract base class to a generic linear programming (LP) solver";
homepage = "https://github.com/coin-or/Osi";
license = licenses.epl10;
platforms = platforms.unix;
maintainers = with maintainers; [ abbradar ];
};
}

@ -22566,6 +22566,8 @@ in
nauty = callPackage ../applications/science/math/nauty {};
osi = callPackage ../development/libraries/science/math/osi { };
or-tools = callPackage ../development/libraries/science/math/or-tools {
pythonProtobuf = pythonPackages.protobuf;
};