anchor.diff:      gmp
       levmar
       qhull
  +    cgal_5
  +    boost17x
  +    mpfr
  +    xercesc
     ];
   
     nativeBuildInputs = [ cmake ];
  
positive.code: , levmar
  , qhull
  , cmake
  }:
  
  mkDerivation rec {
    pname = "meshlab";
    version = "2020.12";
  
    src = fetchFromGitHub {
      owner = "cnr-isti-vclab";
      repo = "meshlab";
      rev = "Meshlab-${version}";
      sha256 = "QrnqXEVqI1ADUYWalZ0h/0+xS+gDZTinm0weT39onw0=";
      fetchSubmodules = true; # for vcglib
    };
  
  
negative.code:     # disable when available in nixpkgs
      "-DALLOW_BUNDLED_OPENCTM=ON"
      "-DALLOW_BUNDLED_SSYNTH=ON"
      "-DALLOW_BUNDLED_BOOST=OFF"
      # some plugins are disabled unless these are on
      "-DALLOW_BUNDLED_NEWUOA=ON"
      "-DALLOW_BUNDLED_LEVMAR=ON"
  