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
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
zlib,
|
||||
fetchFromGitHub,
|
||||
bzip2,
|
||||
cgl,
|
||||
clp,
|
||||
pkg-config,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cbc";
|
||||
version = "2.10.4";
|
||||
version = "2.10.12";
|
||||
|
||||
# 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
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.coin-or.org/download/source/Cbc/Cbc-${version}.tgz";
|
||||
sha256 = "0zq66j1vvpslswhzi9yfgkv6vmg7yry4pdmfgqaqw2vhyqxnsy39";
|
||||
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
|
||||
@@ -25,13 +27,21 @@ stdenv.mkDerivation rec {
|
||||
]
|
||||
++ lib.optionals stdenv.cc.isClang [ "CXXFLAGS=-std=c++14" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
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?
|
||||
@@ -43,4 +53,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
description = "Mixed integer programming solver";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user