anchor.diff:  
     nativeBuildInputs = [ cmake ];
   
  -  patches = [
  -    # Make cmake use the system qhull. The next meshlab will not need this patch because it is already in master.
  -    (fetchpatch {
  -      url = "https://patch-diff.githubusercontent.com/raw/cnr-isti-vclab/meshlab/pull/747.patch";
  -      sha256 = "0wx9f6zn458xz3lsqcgvsbwh1pgi3g0lah93nlbsb0sagng7n565";
  -    })
  -  ];
  -
     preConfigure = ''
  -    substituteAll ${./meshlab.desktop} install/linux/resources/meshlab.desktop
  -    cd src
  +    substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
  +    cmakeDir=$PWD/src
  +    mkdir ../build
  +    cd ../build
     '';
   
     cmakeFlags = [
  
positive.code: { mkDerivation
  , lib
  , fetchFromGitHub
  , fetchpatch
  , libGLU
  , qtbase
  , qtscript
  
negative.code: 
    postFixup = ''
      patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped
    '';
  
    meta = {
      description = "A system for processing and editing 3D triangular meshes";
      homepage = "https://www.meshlab.net/";
      license = lib.licenses.gpl3Only;
      maintainers = with lib.maintainers; [ viric ];
      platforms = with lib.platforms; linux;
    };
  