13 enableStatic ? stdenv.hostPlatform.isStatic,
17 # gflags is required to run tests
18 assert runTests -> gflags != null;
20 stdenv.mkDerivation rec {
21 pname = "ceres-solver";
25 url = "http://ceres-solver.org/ceres-solver-${version}.tar.gz";
26 sha256 = "sha256-99dO7N4K7XW/xR7EjJHQH+Fqa/FrzhmHpwcyhnAeL8Y=";
34 nativeBuildInputs = [ cmake ];
35 buildInputs = lib.optional runTests gflags;
36 propagatedBuildInputs =
41 ++ lib.optionals withBlas [
48 "-DBUILD_SHARED_LIBS=${if enableStatic then "OFF" else "ON"}"
51 # The Basel BUILD file conflicts with the cmake build directory on
52 # case-insensitive filesystems, eg. darwin.
62 description = "C++ library for modeling and solving large, complicated optimization problems";
63 license = licenses.bsd3;
64 homepage = "http://ceres-solver.org";
65 maintainers = with maintainers; [ giogadi ];
66 platforms = platforms.unix;