diff options
Diffstat (limited to 'pkgs/applications/graphics/cloudcompare/default.nix')
-rw-r--r-- | pkgs/applications/graphics/cloudcompare/default.nix | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index 1ad3476e8091..e78b95c363b6 100644 --- a/pkgs/applications/graphics/cloudcompare/default.nix +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -2,6 +2,8 @@ , stdenv , mkDerivation , fetchFromGitHub +, makeDesktopItem +, copyDesktopItems , cmake , boost , cgal @@ -23,13 +25,13 @@ mkDerivation rec { pname = "cloudcompare"; - version = "2.13"; + version = "2.13.1"; src = fetchFromGitHub { owner = "CloudCompare"; repo = "CloudCompare"; rev = "v${version}"; - hash = "sha256-tCmIdajizaTT1tvPA7YQoklfz7pYVKS0lJXrxV2fidg="; + hash = "sha256-QQwQt63tXxJnGaBLu+GvWkEazumYPhXnDe+giSu7wjk="; fetchSubmodules = true; }; @@ -37,6 +39,7 @@ mkDerivation rec { cmake eigen # header-only wrapGAppsHook + copyDesktopItems ]; buildInputs = [ @@ -96,12 +99,15 @@ mkDerivation rec { dontWrapGApps = true; postInstall = '' - install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.png -t $out/share/icons/hicolor/256x256/apps - install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.desktop -t $out/share/applications - substituteInPlace $out/share/applications/{ccViewer,cloudcompare}.desktop \ - --replace 'Exec=cloudcompare.' 'Exec=' \ - --replace 'Icon=''${SNAP}/meta/gui/' 'Icon=' \ - --replace '.png' "" + install -Dm444 $src/qCC/images/icon/cc_icon_16.png $out/share/icons/hicolor/16x16/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_32.png $out/share/icons/hicolor/32x32/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_64.png $out/share/icons/hicolor/64x64/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_256.png $out/share/icons/hicolor/256x256/apps/CloudCompare.png + + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_16.png $out/share/icons/hicolor/16x16/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_32.png $out/share/icons/hicolor/32x32/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_64.png $out/share/icons/hicolor/64x64/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_256.png $out/share/icons/hicolor/256x256/apps/ccViewer.png ''; # fix file dialogs crashing on non-NixOS (and avoid double wrapping) @@ -109,11 +115,35 @@ mkDerivation rec { qtWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; + desktopItems = [ + (makeDesktopItem { + name = "CloudCompare"; + desktopName = "CloudCompare"; + comment = "3D point cloud and mesh processing software"; + exec = "CloudCompare"; + terminal = false; + categories = [ "Graphics" "3DGraphics" "Viewer" ]; + keywords = [ "3d" "processing" ]; + icon = "CloudCompare"; + }) + (makeDesktopItem { + name = "ccViewer"; + desktopName = "CloudCompare Viewer"; + comment = "3D point cloud and mesh processing software"; + exec = "ccViewer"; + terminal = false; + categories = [ "Graphics" "3DGraphics" "Viewer" ]; + keywords = [ "3d" "viewer" ]; + icon = "ccViewer"; + }) + ]; + meta = with lib; { description = "3D point cloud and mesh processing software"; homepage = "https://cloudcompare.org"; license = licenses.gpl2Plus; maintainers = with maintainers; [ nh2 ]; + mainProgram = "CloudCompare"; platforms = with platforms; linux; # only tested here; might work on others }; } |