depot/third_party/nixpkgs/pkgs/applications/science/misc/openmvs/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

34 lines
978 B
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, eigen, opencv, cgal, ceres-solver, boost, vcg, glfw, zstd }:
let
boostWithZstd = boost.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ zstd ];
});
in
stdenv.mkDerivation rec {
version = "2.1.0";
pname = "openmvs";
src = fetchFromGitHub {
owner = "cdcseacave";
repo = "openmvs";
rev = "v${version}";
sha256 = "sha256-eqNprBgR0hZnbLKLZLJqjemKxHhDtGblmaSxYlmegsc=";
fetchSubmodules = true;
};
# SSE is enabled by default
cmakeFlags = lib.optional (!stdenv.isx86_64) "-DOpenMVS_USE_SSE=OFF";
buildInputs = [ eigen opencv cgal ceres-solver vcg glfw boostWithZstd ];
nativeBuildInputs = [ cmake pkg-config ];
meta = {
description = "Open Multi-View Stereo reconstruction library";
homepage = "https://github.com/cdcseacave/openMVS";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ bouk ];
};
}