2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib, bzip2 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cbc";
|
2021-02-22 21:28:39 +00:00
|
|
|
version = "2.10.4";
|
|
|
|
|
|
|
|
# Note: Cbc 2.10.5 contains Clp 1.17.5 which hits this bug
|
|
|
|
# that breaks or-tools https://github.com/coin-or/Clp/issues/130
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.coin-or.org/download/source/Cbc/Cbc-${version}.tgz";
|
2021-02-22 21:28:39 +00:00
|
|
|
sha256 = "0zq66j1vvpslswhzi9yfgkv6vmg7yry4pdmfgqaqw2vhyqxnsy39";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
# or-tools has a hard dependency on Cbc static libraries, so we build both
|
2024-01-02 11:29:13 +00:00
|
|
|
configureFlags = [ "-C" "--enable-static" ]
|
|
|
|
++ lib.optionals stdenv.cc.isClang [ "CXXFLAGS=-std=c++14" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib bzip2 ];
|
|
|
|
|
|
|
|
# FIXME: move share/coin/Data to a separate output?
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://projects.coin-or.org/Cbc";
|
|
|
|
license = lib.licenses.epl10;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Mixed integer programming solver";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|