nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 56 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 bzip2, 6 cgl, 7 clp, 8 pkg-config, 9 zlib, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "cbc"; 14 version = "2.10.12"; 15 16 src = fetchFromGitHub { 17 owner = "coin-or"; 18 repo = "Cbc"; 19 tag = "releases/${finalAttrs.version}"; 20 sha256 = "sha256-0Sz4/7CRKrArIUy/XxGIP7WMmICqDJ0VxZo62thChYQ="; 21 }; 22 23 # or-tools has a hard dependency on Cbc static libraries, so we build both 24 configureFlags = [ 25 "-C" 26 "--enable-static" 27 ] 28 ++ lib.optionals stdenv.cc.isClang [ "CXXFLAGS=-std=c++14" ]; 29 30 nativeBuildInputs = [ pkg-config ]; 31 32 enableParallelBuilding = true; 33 34 hardeningDisable = [ "format" ]; 35 36 buildInputs = [ 37 bzip2 38 zlib 39 ]; 40 41 # cbc lists cgl and clp in its .pc requirements, so it needs to be propagated. 42 propagatedBuildInputs = [ 43 cgl 44 clp 45 ]; 46 47 # FIXME: move share/coin/Data to a separate output? 48 49 meta = { 50 homepage = "https://projects.coin-or.org/Cbc"; 51 license = lib.licenses.epl10; 52 maintainers = [ ]; 53 platforms = lib.platforms.linux ++ lib.platforms.darwin; 54 description = "Mixed integer programming solver"; 55 }; 56})