From 947c66db1d4dac643511d5f09c558ea545746128 Mon Sep 17 00:00:00 2001 From: koalp Date: Mon, 4 Mar 2024 17:18:53 +0100 Subject: cloudcompare: add desktop entries for ccViewer and CloudCompare CloudCompare no longer provides snap directory with images and .desktop entry since they removed snap builds support. Those files where used during the nix package build to create a .desktop entry. Since they no longer exists the build fails. To solve the issue, the build of the desktop entry have been replaced by desktop entries in the package definition. --- .../applications/graphics/cloudcompare/default.nix | 41 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index 1ad3476e8091..0dbfac4821c6 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 @@ -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,6 +115,29 @@ 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"; -- cgit 1.4.1 From c17ac8ab77c4b13898044eafc46d4085805d3ff9 Mon Sep 17 00:00:00 2001 From: koalp Date: Sun, 10 Mar 2024 23:32:21 +0100 Subject: cloudcompare: set mainProgram to CloudCompare --- pkgs/applications/graphics/cloudcompare/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index 0dbfac4821c6..f8532a03a8e1 100644 --- a/pkgs/applications/graphics/cloudcompare/default.nix +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -143,6 +143,7 @@ mkDerivation rec { homepage = "https://cloudcompare.org"; license = licenses.gpl2Plus; maintainers = with maintainers; [ nh2 ]; + mainProgram = "CloudCompare"; platforms = with platforms; linux; # only tested here; might work on others }; } -- cgit 1.4.1 From c3e7d8e3b57dc65c9e27ddc31394911437da7498 Mon Sep 17 00:00:00 2001 From: koalp Date: Thu, 21 Mar 2024 14:06:25 +0100 Subject: cloudcompare: 2.13 -> 2.13.1 --- pkgs/applications/graphics/cloudcompare/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index f8532a03a8e1..e78b95c363b6 100644 --- a/pkgs/applications/graphics/cloudcompare/default.nix +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -25,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; }; -- cgit 1.4.1