anchor.diff:  , qttools
   , tbb
   , xercesc
  +, wrapGAppsHook
   }:
   
   mkDerivation rec {
     pname = "cloudcompare";
  -  # Released version(v2.11.3) doesn't work with packaged PCL.
  -  version = "unstable-2021-10-14";
  +  version = "2.12.0";
   
     src = fetchFromGitHub {
       owner = "CloudCompare";
       repo = "CloudCompare";
  -    rev = "1f65ba63756e23291ae91ff52d04da468ade8249";
  -    sha256 = "x1bDjFjXIl3r+yo1soWvRB+4KGP50/WBoGlrH013JQo=";
  -    # As of writing includes (https://github.com/CloudCompare/CloudCompare/blob/a1c589c006fc325e8b560c77340809b9c7e7247a/.gitmodules):
  -    # * libE57Format
  -    # * PoissonRecon
  -    # * CCCoreLib
  +    rev = "v${version}";
  +    sha256 = "sha256-hu3ckVocExi9lvxelHAwKb/MZacH4CcCE+vIzElgP/A=";
       fetchSubmodules = true;
     };
  +
  +  patches = [
  +    # fix issues compiling on aarch64. remove once upgraded past 2.12.0
  +    (fetchpatch {
  +      url = "https://github.com/CloudCompare/CloudCompare/commit/7e71861fdbd6ea704add5ba69343f47d8fc3d5ae.patch";
  +      sha256 = "sha256-CRUPjxtKUbsqOyYsjKF+dRZ+E3rqrv5mS3ZaOay2wk8=";
  +    })
  +  ];
   
     nativeBuildInputs = [
       cmake
       eigen # header-only
  +    wrapGAppsHook
     ];
   
     buildInputs = [
  -    dxflib
  +    boost
  +    cgal_5
       flann
       gdal
  +    gmp
       LASzip
  -    libLAS
  +    mpfr
       pdal
       pcl
       qtbase
  
positive.code:     "-DPLUGIN_IO_QPHOTOSCAN=ON"
      "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
  
      "-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support
    ];
  
    meta = with lib; {
      description = "3D point cloud and mesh processing software";
  
negative.code: { lib
  , mkDerivation
  , fetchFromGitHub
  , fetchpatch
  , cmake
  , boost
  , cgal_5
  , eigen
  , flann
  , gdal
  , gmp
  , LASzip
  , mpfr
  , pdal
  , pcl
  , qtbase
  