2017-05-03 13:55:06 +01:00
|
|
|
{ lib, stdenv, fetchgit, pkgconfig, cmake
|
|
|
|
, libjpeg ? null
|
|
|
|
, zlib ? null
|
|
|
|
, libpng ? null
|
|
|
|
, eigen ? null
|
|
|
|
, libtiff ? null
|
|
|
|
, enableExamples ? false
|
|
|
|
, enableDocs ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-06-25 23:12:26 +01:00
|
|
|
version = "1.3";
|
2017-05-03 13:55:06 +01:00
|
|
|
name = "openmvg-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://www.github.com/openmvg/openmvg.git";
|
|
|
|
|
|
|
|
# Tag v1.1
|
2017-05-08 15:07:09 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2018-06-25 23:12:26 +01:00
|
|
|
sha256 = "1cf1gbcl8zvxp4rr6f6vaxwcg0yzc4xban2b5p9zy1m4k1f81zyb";
|
2017-05-03 13:55:06 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libjpeg zlib libpng eigen libtiff ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
|
|
|
"-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
|
|
|
|
"-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeDir = "./src";
|
|
|
|
|
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
|
|
|
|
# This can be enabled, but it will exhause virtual memory on most machines.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
# Without hardeningDisable, certain flags are passed to the compile that break the build (primarily string format errors)
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community";
|
|
|
|
homepage = http://openmvg.readthedocs.io/en/latest/;
|
|
|
|
license = stdenv.lib.licenses.mpl20;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ mdaiter ];
|
2018-04-11 10:31:38 +01:00
|
|
|
broken = true; # 2018-04-11
|
2017-05-03 13:55:06 +01:00
|
|
|
};
|
|
|
|
}
|