chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / applications / graphics / cloudcompare / default.nix
blob738ce255a4cf77fd9899354558cb561a075bab28
1 { lib
2 , mkDerivation
3 , fetchFromGitHub
4 , makeDesktopItem
5 , copyDesktopItems
6 , cmake
7 , boost
8 , cgal
9 , eigen
10 , flann
11 , gdal
12 , gmp
13 , laszip
14 , mpfr
15 , pcl
16 , qtbase
17 , qtsvg
18 , qttools
19 , tbb
20 , xercesc
21 , wrapGAppsHook3
24 mkDerivation rec {
25   pname = "cloudcompare";
26   version = "2.13.2";
28   src = fetchFromGitHub {
29     owner = "CloudCompare";
30     repo = "CloudCompare";
31     rev = "v${version}";
32     hash = "sha256-a/0lf3Mt5ZpLFRM8jAoqZer8pY1ROgPRY4dPt34Bk3E=";
33     fetchSubmodules = true;
34   };
36   nativeBuildInputs = [
37     cmake
38     eigen # header-only
39     wrapGAppsHook3
40     copyDesktopItems
41   ];
43   buildInputs = [
44     boost
45     cgal
46     flann
47     gdal
48     gmp
49     laszip
50     mpfr
51     pcl
52     qtbase
53     qtsvg
54     qttools
55     tbb
56     xercesc
57   ];
59   cmakeFlags = [
60     "-DCCCORELIB_USE_TBB=ON"
61     "-DOPTION_USE_DXF_LIB=ON"
62     "-DOPTION_USE_GDAL=ON"
63     "-DOPTION_USE_SHAPE_LIB=ON"
65     "-DPLUGIN_GL_QEDL=ON"
66     "-DPLUGIN_GL_QSSAO=ON"
68     "-DPLUGIN_IO_QADDITIONAL=ON"
69     "-DPLUGIN_IO_QCORE=ON"
70     "-DPLUGIN_IO_QCSV_MATRIX=ON"
71     "-DPLUGIN_IO_QE57=ON"
72     "-DPLUGIN_IO_QFBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
73     "-DPLUGIN_IO_QLAS=ON" # required for .las/.laz support
74     "-DPLUGIN_IO_QPHOTOSCAN=ON"
75     "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
77     "-DCCCORELIB_USE_CGAL=ON" # enables Delauney triangulation support
78     "-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support
79     "-DPLUGIN_STANDARD_QANIMATION=ON"
80     "-DPLUGIN_STANDARD_QBROOM=ON"
81     "-DPLUGIN_STANDARD_QCANUPO=ON"
82     "-DPLUGIN_STANDARD_QCOMPASS=ON"
83     "-DPLUGIN_STANDARD_QCSF=ON"
84     "-DPLUGIN_STANDARD_QFACETS=ON"
85     "-DPLUGIN_STANDARD_QHOUGH_NORMALS=ON"
86     "-DEIGEN_ROOT_DIR=${eigen}/include/eigen3" # needed for hough normals
87     "-DPLUGIN_STANDARD_QHPR=ON"
88     "-DPLUGIN_STANDARD_QM3C2=ON"
89     "-DPLUGIN_STANDARD_QMPLANE=ON"
90     "-DPLUGIN_STANDARD_QPOISSON_RECON=ON"
91     "-DPLUGIN_STANDARD_QRANSAC_SD=OFF" # not compatible with GPL, broken on non-x86
92     "-DPLUGIN_STANDARD_QSRA=ON"
93     "-DPLUGIN_STANDARD_QCLOUDLAYERS=ON"
94   ];
96   dontWrapGApps = true;
98   postInstall = ''
99     install -Dm444 $src/qCC/images/icon/cc_icon_16.png $out/share/icons/hicolor/16x16/apps/CloudCompare.png
100     install -Dm444 $src/qCC/images/icon/cc_icon_32.png $out/share/icons/hicolor/32x32/apps/CloudCompare.png
101     install -Dm444 $src/qCC/images/icon/cc_icon_64.png $out/share/icons/hicolor/64x64/apps/CloudCompare.png
102     install -Dm444 $src/qCC/images/icon/cc_icon_256.png $out/share/icons/hicolor/256x256/apps/CloudCompare.png
104     install -Dm444 $src/qCC/images/icon/cc_viewer_icon_16.png $out/share/icons/hicolor/16x16/apps/ccViewer.png
105     install -Dm444 $src/qCC/images/icon/cc_viewer_icon_32.png $out/share/icons/hicolor/32x32/apps/ccViewer.png
106     install -Dm444 $src/qCC/images/icon/cc_viewer_icon_64.png $out/share/icons/hicolor/64x64/apps/ccViewer.png
107     install -Dm444 $src/qCC/images/icon/cc_viewer_icon_256.png $out/share/icons/hicolor/256x256/apps/ccViewer.png
108   '';
110   # fix file dialogs crashing on non-NixOS (and avoid double wrapping)
111   preFixup = ''
112     qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
113   '';
115   desktopItems = [
116     (makeDesktopItem {
117       name = "CloudCompare";
118       desktopName = "CloudCompare";
119       comment = "3D point cloud and mesh processing software";
120       exec = "CloudCompare";
121       terminal = false;
122       categories = [ "Graphics" "3DGraphics" "Viewer" ];
123       keywords = [ "3d" "processing" ];
124       icon = "CloudCompare";
125     })
126     (makeDesktopItem {
127       name = "ccViewer";
128       desktopName = "CloudCompare Viewer";
129       comment = "3D point cloud and mesh processing software";
130       exec = "ccViewer";
131       terminal = false;
132       categories = [ "Graphics" "3DGraphics" "Viewer" ];
133       keywords = [ "3d" "viewer" ];
134       icon = "ccViewer";
135     })
136   ];
138   meta = with lib; {
139     description = "3D point cloud and mesh processing software";
140     homepage = "https://cloudcompare.org";
141     license = licenses.gpl2Plus;
142     maintainers = with maintainers; [ nh2 ];
143     mainProgram = "CloudCompare";
144     platforms = with platforms; linux; # only tested here; might work on others
145   };