1 { mkDerivation, lib, fetchFromGitHub, cmake, boost179, ceres-solver, eigen,
2 freeimage, glog, libGLU, glew, qtbase,
4 cudaSupport ? config.cudaSupport, cudaPackages }:
6 assert cudaSupport -> cudaPackages != { };
9 boost_static = boost179.override { enableStatic = true; };
11 # TODO: migrate to redist packages
12 inherit (cudaPackages) cudatoolkit;
17 src = fetchFromGitHub {
21 hash = "sha256-uVAw6qwhpgIpHkXgxttKupU9zU+vD0Za0maw2Iv4x+I=";
24 # TODO: rm once the gcc11 issue is closed, https://github.com/colmap/colmap/issues/1418#issuecomment-1049305256
25 cmakeFlags = lib.optionals cudaSupport [
27 "-DCUDA_NVCC_FLAGS=--std=c++14"
31 boost_static ceres-solver eigen
32 freeimage glog libGLU glew qtbase
33 ] ++ lib.optionals cudaSupport [
39 ] ++ lib.optionals cudaSupport [
40 cudaPackages.autoAddOpenGLRunpathHook
44 description = "COLMAP - Structure-From-Motion and Multi-View Stereo pipeline";
46 COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline
47 with a graphical and command-line interface.
49 homepage = "https://colmap.github.io/index.html";
50 license = licenses.bsd3;
51 platforms = platforms.linux;
52 maintainers = with maintainers; [ lebastr ];