Files
Florian Klink f6620e26a4 cbc: 2.10.4 -> 2.10.12
Also:

 - migrate the package to finalAttrs
 - fetch sources via fetchFromGitHub to prevent xz-style issues
 - add new dependencies cgl and clp, as well as pkg-config to discover
   them
 - drop link to now fixed https://github.com/coin-or/Clp/issues/130
2025-10-05 16:47:44 +03:00

57 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
bzip2,
cgl,
clp,
pkg-config,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cbc";
version = "2.10.12";
src = fetchFromGitHub {
owner = "coin-or";
repo = "Cbc";
tag = "releases/${finalAttrs.version}";
sha256 = "sha256-0Sz4/7CRKrArIUy/XxGIP7WMmICqDJ0VxZo62thChYQ=";
};
# or-tools has a hard dependency on Cbc static libraries, so we build both
configureFlags = [
"-C"
"--enable-static"
]
++ lib.optionals stdenv.cc.isClang [ "CXXFLAGS=-std=c++14" ];
nativeBuildInputs = [ pkg-config ];
enableParallelBuilding = true;
hardeningDisable = [ "format" ];
buildInputs = [
bzip2
zlib
];
# cbc lists cgl and clp in its .pc requirements, so it needs to be propagated.
propagatedBuildInputs = [
cgl
clp
];
# FIXME: move share/coin/Data to a separate output?
meta = {
homepage = "https://projects.coin-or.org/Cbc";
license = lib.licenses.epl10;
maintainers = [ ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
description = "Mixed integer programming solver";
};
})