-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
/
default.nix
53 lines (46 loc) · 1.48 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ mkDerivation, lib, fetchFromGitHub, cmake, boost17x, ceres-solver, eigen,
freeimage, glog, libGLU, glew, qtbase,
cudaSupport ? false, cudaPackages }:
assert cudaSupport -> cudaPackages != { };
let
boost_static = boost17x.override { enableStatic = true; };
# TODO: migrate to redist packages
inherit (cudaPackages) cudatoolkit;
in
mkDerivation rec {
version = "3.7";
pname = "colmap";
src = fetchFromGitHub {
owner = "colmap";
repo = "colmap";
rev = version;
hash = "sha256-uVAw6qwhpgIpHkXgxttKupU9zU+vD0Za0maw2Iv4x+I=";
};
# TODO: rm once the gcc11 issue is closed, https://github.com/colmap/colmap/issues/1418#issuecomment-1049305256
cmakeFlags = lib.optionals cudaSupport [
"-DCUDA_ENABLED=ON"
"-DCUDA_NVCC_FLAGS=--std=c++14"
];
buildInputs = [
boost_static ceres-solver eigen
freeimage glog libGLU glew qtbase
] ++ lib.optionals cudaSupport [
cudatoolkit
];
nativeBuildInputs = [
cmake
] ++ lib.optionals cudaSupport [
cudaPackages.autoAddOpenGLRunpathHook
];
meta = with lib; {
description = "COLMAP - Structure-From-Motion and Multi-View Stereo pipeline";
longDescription = ''
COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline
with a graphical and command-line interface.
'';
homepage = "https://colmap.github.io/index.html";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ lebastr ];
};
}