2020-09-25 04:45:31 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, libGLU
|
|
|
|
, qtbase
|
|
|
|
, qtscript
|
|
|
|
, qtxmlpatterns
|
|
|
|
, lib3ds
|
|
|
|
, bzip2
|
|
|
|
, muparser
|
2020-08-20 17:08:02 +00:00
|
|
|
, eigen
|
|
|
|
, glew
|
|
|
|
, gmp
|
2020-04-24 23:36:52 +00:00
|
|
|
, levmar
|
2020-08-20 17:08:02 +00:00
|
|
|
, qhull
|
|
|
|
, cmake
|
2024-01-02 11:29:13 +00:00
|
|
|
, cgal
|
2023-07-15 17:15:38 +00:00
|
|
|
, boost179
|
2022-01-03 16:56:52 +00:00
|
|
|
, mpfr
|
|
|
|
, xercesc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
mkDerivation rec {
|
|
|
|
pname = "meshlab";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "2022.02";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "meshlab";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "MeshLab-${version}";
|
|
|
|
sha256 = "sha256-jcc3PfsiIeYyipteZgzd0NwZgFFgR/mMBiaInzhOcDY=";
|
2020-08-20 17:08:02 +00:00
|
|
|
fetchSubmodules = true; # for vcglib
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGLU
|
|
|
|
qtbase
|
|
|
|
qtscript
|
|
|
|
qtxmlpatterns
|
|
|
|
lib3ds
|
|
|
|
bzip2
|
|
|
|
muparser
|
2020-08-20 17:08:02 +00:00
|
|
|
eigen
|
|
|
|
glew
|
|
|
|
gmp
|
2020-04-24 23:36:52 +00:00
|
|
|
levmar
|
2020-08-20 17:08:02 +00:00
|
|
|
qhull
|
2024-01-02 11:29:13 +00:00
|
|
|
cgal
|
2023-07-15 17:15:38 +00:00
|
|
|
boost179
|
2022-01-03 16:56:52 +00:00
|
|
|
mpfr
|
|
|
|
xercesc
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2021-03-23 19:22:30 +00:00
|
|
|
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
|
|
|
|
cmakeDir=$PWD/src
|
|
|
|
mkdir ../build
|
|
|
|
cd ../build
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DALLOW_BUNDLED_EIGEN=OFF"
|
|
|
|
"-DALLOW_BUNDLED_GLEW=OFF"
|
|
|
|
"-DALLOW_BUNDLED_LIB3DS=OFF"
|
|
|
|
"-DALLOW_BUNDLED_MUPARSER=OFF"
|
|
|
|
"-DALLOW_BUNDLED_QHULL=OFF"
|
2020-09-25 04:45:31 +00:00
|
|
|
# disable when available in nixpkgs
|
2020-08-20 17:08:02 +00:00
|
|
|
"-DALLOW_BUNDLED_OPENCTM=ON"
|
|
|
|
"-DALLOW_BUNDLED_SSYNTH=ON"
|
2022-01-03 16:56:52 +00:00
|
|
|
"-DALLOW_BUNDLED_BOOST=OFF"
|
2020-08-20 17:08:02 +00:00
|
|
|
# some plugins are disabled unless these are on
|
|
|
|
"-DALLOW_BUNDLED_NEWUOA=ON"
|
|
|
|
"-DALLOW_BUNDLED_LEVMAR=ON"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
CXXFLAGS = [
|
|
|
|
# GCC 13: error: 'int16_t' has not been declared in 'std'
|
|
|
|
"-include cstdint"
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postFixup = ''
|
|
|
|
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "A system for processing and editing 3D triangular meshes";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://www.meshlab.net/";
|
2021-03-23 19:22:30 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with lib.maintainers; [ viric ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|