summary refs log tree commit diff
path: root/pkgs/applications/graphics/cloudcompare
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2020-03-13 16:27:42 +0100
committerNiklas Hambüchen <mail@nh2.me>2020-06-26 15:06:51 +0200
commit254c2fb8d0b429e460813716cc3effd7d6e3a720 (patch)
treee0eb952a1de81a8d19dea72ed7a925b40764bfd0 /pkgs/applications/graphics/cloudcompare
parent4e8e63f2784d2595cb9d64a57050f982e71926e8 (diff)
downloadnixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar.gz
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar.bz2
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar.lz
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar.xz
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.tar.zst
nixpkgs-254c2fb8d0b429e460813716cc3effd7d6e3a720.zip
cloudcompare: init at 2.11.0
Based on:

https://git.computecanada.ca/nix/ccpkgs/commit/6118f8b2757fc436bdd62c6d7f10d36454dda481
Diffstat (limited to 'pkgs/applications/graphics/cloudcompare')
-rw-r--r--pkgs/applications/graphics/cloudcompare/default.nix83
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix
new file mode 100644
index 00000000000..84844191235
--- /dev/null
+++ b/pkgs/applications/graphics/cloudcompare/default.nix
@@ -0,0 +1,83 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, wrapQtAppsHook
+, dxflib
+, eigen
+, flann
+, gdal
+, LASzip
+, libLAS
+, pdal
+, qtbase
+, qtsvg
+, qttools
+, tbb
+, xercesc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cloudcompare";
+  version = "2.11.0";
+
+  src = fetchFromGitHub {
+    owner = "CloudCompare";
+    repo = "CloudCompare";
+    rev = "v${version}";
+    sha256 = "02ahhhivgb9k1aygw1m35wdvhaizag1r98mb0r6zzrs5p4y64wlb";
+    # As of writing includes (https://github.com/CloudCompare/CloudCompare/blob/a1c589c006fc325e8b560c77340809b9c7e7247a/.gitmodules):
+    # * libE57Format
+    # * PoissonRecon
+    # In > 2.11 it will also contain
+    # * CCCoreLib
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    eigen # header-only
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dxflib
+    flann
+    gdal
+    LASzip
+    libLAS
+    pdal
+    qtbase
+    qtsvg
+    qttools
+    tbb
+    xercesc
+  ];
+
+  cmakeFlags = [
+    # TODO: This will become -DCCCORELIB_USE_TBB=ON in > 2.11.0, see
+    #       https://github.com/CloudCompare/CloudCompare/commit/f5a0c9fd788da26450f3fa488b2cf0e4a08d255f
+    "-DCOMPILE_CC_CORE_LIB_WITH_TBB=ON"
+    "-DOPTION_USE_DXF_LIB=ON"
+    "-DOPTION_USE_GDAL=ON"
+    "-DOPTION_USE_SHAPE_LIB=ON"
+
+    "-DPLUGIN_GL_QEDL=ON"
+    "-DPLUGIN_GL_QSSAO=ON"
+    "-DPLUGIN_IO_QADDITIONAL=ON"
+    "-DPLUGIN_IO_QCORE=ON"
+    "-DPLUGIN_IO_QCSV_MATRIX=ON"
+    "-DPLUGIN_IO_QE57=ON"
+    "-DPLUGIN_IO_QFBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
+    "-DPLUGIN_IO_QPDAL=ON" # required for .las/.laz support
+    "-DPLUGIN_IO_QPHOTOSCAN=ON"
+    "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
+  ];
+
+  meta = with stdenv.lib; {
+    description = "3D point cloud and mesh processing software";
+    homepage = "https://cloudcompare.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ nh2 ];
+    platforms = with platforms; linux; # only tested here; might work on others
+  };
+}