about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-05-05 15:58:17 +0200
committerGitHub <noreply@github.com>2017-05-05 15:58:17 +0200
commit587ed894a4293ee7315079d8324d3fc1edfe8a81 (patch)
tree30a336715ddb9b343c0a3572ddbfd4a9f05c21f6 /pkgs/applications/science
parentaf87b922f1af3614ec338197b6193433a78840a0 (diff)
parentc6385eb0f58dc3ccb86a52dd35299c25e4061c4d (diff)
downloadnixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar.gz
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar.bz2
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar.lz
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar.xz
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.tar.zst
nixlib-587ed894a4293ee7315079d8324d3fc1edfe8a81.zip
Merge pull request #25480 from mdaiter/openmvg
openmvg: init at v1.1
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/misc/openmvg/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/openmvg/default.nix b/pkgs/applications/science/misc/openmvg/default.nix
new file mode 100644
index 000000000000..05e0a98d08ec
--- /dev/null
+++ b/pkgs/applications/science/misc/openmvg/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchgit, pkgconfig, cmake
+, libjpeg ? null
+, zlib ? null
+, libpng ? null
+, eigen ? null
+, libtiff ? null
+, enableExamples ? false
+, enableDocs ? false }:
+
+stdenv.mkDerivation rec {
+  version = "1.1";
+  name = "openmvg-${version}";
+
+  src = fetchgit {
+    url = "https://www.github.com/openmvg/openmvg.git";
+
+    # Tag v1.1
+    rev = "f5ecb48";
+    sha256 = "1di9i7yxnkdvl8lhflynmqw62gaxwv00r1sd7nzzs9qn63g0af0f";
+    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 ];
+  };
+}