diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-21 16:48:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 16:48:53 +0100 |
commit | b2b626aab40c28f30d51c472db50b245c78f7ac4 (patch) | |
tree | f4d2193bb9772ff67cd4027c32987e2ea38de598 | |
parent | 952804a3d25df456584e1c95b42a7196b35b2ebf (diff) | |
parent | c3e7d8e3b57dc65c9e27ddc31394911437da7498 (diff) | |
download | nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar.gz nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar.bz2 nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar.lz nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar.xz nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.tar.zst nixlib-b2b626aab40c28f30d51c472db50b245c78f7ac4.zip |
Merge pull request #293291 from koalp/fix/make-cloudcompare-compile
cloudcompare: creation of .desktop entry
-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 }; } |