git.iko.soy/typeable/nixpkgs
on master help sign in
osi: init at 0.108.4
commit08b1d8108921f0228f30ede36e68bcf7242aa11f authorNikolay Amiantov <ab@fmap.me> dateSat 22 Jun 2019, 02:22 (7 years ago) parenta926115
2 files changed+44
pkgs/development/libraries/science/math/osi/default.nix+42 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/science/math/osi/default.nixnew file+42
@@ -0,0 +1,42 @@
1+{ stdenv, lib, fetchurl, gfortran, pkgconfig
2+, blas, zlib, bzip2
3+, withGurobi ? false, gurobi
4+, withCplex ? false, cplex }:
5+
6+stdenv.mkDerivation rec {
7+ pname = "osi";
8+ version = "0.108.4";
9+
10+ src = fetchurl {
11+ url = "https://www.coin-or.org/download/source/Osi/Osi-${version}.tgz";
12+ sha256 = "13bwhdh01g37vp3kjwl9nvij5s5ikh5f7zgrqgwrqfyk35q2x9s5";
13+ };
14+
15+ buildInputs =
16+ [ blas zlib bzip2 ]
17+ ++ lib.optional withGurobi gurobi
18+ ++ lib.optional withCplex cplex;
19+ nativeBuildInputs = [ gfortran pkgconfig ];
20+ configureFlags =
21+ lib.optionals withGurobi [ "--with-gurobi-incdir=${gurobi}/include" "--with-gurobi-lib=-lgurobi${gurobi.libSuffix}" ]
22+ ++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ];
23+
24+ NIX_LDFLAGS =
25+ lib.optional withCplex "-L${cplex}/cplex/bin/${cplex.libArch}";
26+
27+ # Compile errors
28+ NIX_CFLAGS_COMPILE = [ "-Wno-cast-qual" ];
29+ hardeningDisable = [ "format" ];
30+
31+ enableParallelBuilding = true;
32+
33+ passthru = { inherit withGurobi withCplex; };
34+
35+ meta = with stdenv.lib; {
36+ description = "An abstract base class to a generic linear programming (LP) solver";
37+ homepage = "https://github.com/coin-or/Osi";
38+ license = licenses.epl10;
39+ platforms = platforms.unix;
40+ maintainers = with maintainers; [ abbradar ];
41+ };
42+}
pkgs/top-level/all-packages.nix+2
@@ -22566,6 +22566,8 @@ in
2256622566
2256722567 nauty = callPackage ../applications/science/math/nauty {};
2256822568
22569+ osi = callPackage ../development/libraries/science/math/osi { };
22570+
2256922571 or-tools = callPackage ../development/libraries/science/math/or-tools {
2257022572 pythonProtobuf = pythonPackages.protobuf;
2257122573 };