Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.1 KiB
Nix
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";
|
|
};
|
|
})
|