39 ceresSplit = (builtins.length ceres-solver.outputs) > 1;
45 buildPythonPackage rec {
47 version = "unstable-2023-12-09";
49 src = fetchFromGitHub {
52 rev = "7f170d0dc352340295ff480378e3ac37d0179f8e";
53 sha256 = "sha256-l/HTVenC+L+GpMNnDgnSGZ7+Qd2j8b8cuTs3SmORqrg=";
56 ./0002-cmake-find-system-distributed-gtest.patch
57 ./0003-cmake-use-system-pybind11.patch
58 ./0004-pybind_utils.h-conflicts-with-nixpkgs-pybind.patch
62 rm opensfm/src/cmake/FindGlog.cmake
63 rm opensfm/src/cmake/FindGflags.cmake
65 # HAHOG is the default descriptor.
66 # We'll test both HAHOG and SIFT because this is
67 # where segfaults might be introduced in future
68 echo 'feature_type: SIFT' >> data/berlin/config.yaml
69 echo 'feature_type: HAHOG' >> data/lund/config.yaml
71 sed -i -e 's/^.*BuildDoc.*$//' setup.py
74 nativeBuildInputs = [ cmake pkg-config sphinx ];
86 propagatedBuildInputs = [
104 nativeCheckInputs = [ pytestCheckHook ];
106 dontUseCmakeBuildDir = true;
113 "test_run_all" # Matplotlib issues. Broken integration is less useless than a broken build
114 ] ++ lib.optionals stdenv.isDarwin [
115 "test_reconstruction_incremental"
116 "test_reconstruction_triangulation"
119 pythonImportsCheck = [ "opensfm" ];
122 broken = stdenv.isDarwin;
123 maintainers = [ lib.maintainers.SomeoneSerge ];
124 license = lib.licenses.bsd2;
125 changelog = "https://github.com/mapillary/OpenSfM/blob/${src.rev}/CHANGELOG.md";
126 description = "Open source Structure-from-Motion pipeline from Mapillary";
127 homepage = "https://opensfm.org/";