2020-08-03 00:27:15 +01:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2019-10-10 22:57:51 +01:00
|
|
|
, libGLU
|
|
|
|
, qtbase
|
|
|
|
, qtscript
|
|
|
|
, qtxmlpatterns
|
|
|
|
, lib3ds
|
|
|
|
, bzip2
|
|
|
|
, muparser
|
2020-03-24 16:10:32 +00:00
|
|
|
, eigen
|
|
|
|
, glew
|
|
|
|
, gmp
|
2019-10-10 22:57:51 +01:00
|
|
|
, levmar
|
2020-03-24 16:10:32 +00:00
|
|
|
, qhull
|
|
|
|
, cmake
|
2021-12-06 04:35:38 +00:00
|
|
|
, cgal_5
|
|
|
|
, boost17x
|
|
|
|
, mpfr
|
|
|
|
, xercesc
|
2019-10-10 22:57:51 +01:00
|
|
|
}:
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2020-03-24 16:10:32 +00:00
|
|
|
mkDerivation rec {
|
|
|
|
pname = "meshlab";
|
2022-02-24 14:15:58 +00:00
|
|
|
version = "2022.02";
|
2018-08-14 09:50:28 +01:00
|
|
|
|
2020-03-24 16:10:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "meshlab";
|
2020-08-03 00:27:15 +01:00
|
|
|
rev = "Meshlab-${version}";
|
2022-02-24 14:15:58 +00:00
|
|
|
sha256 = "sha256-MP+jkiV6yS1T1eWClxM56kZWLXwu0g4w/zBHy6CSL6Y=";
|
2020-03-24 16:10:32 +00:00
|
|
|
fetchSubmodules = true; # for vcglib
|
2019-10-10 22:57:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGLU
|
|
|
|
qtbase
|
|
|
|
qtscript
|
|
|
|
qtxmlpatterns
|
|
|
|
lib3ds
|
|
|
|
bzip2
|
|
|
|
muparser
|
2020-03-24 16:10:32 +00:00
|
|
|
eigen
|
|
|
|
glew
|
|
|
|
gmp
|
2019-10-10 22:57:51 +01:00
|
|
|
levmar
|
2020-03-24 16:10:32 +00:00
|
|
|
qhull
|
2021-12-06 04:35:38 +00:00
|
|
|
cgal_5
|
|
|
|
boost17x
|
|
|
|
mpfr
|
|
|
|
xercesc
|
2020-03-24 16:10:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2021-03-13 21:18:17 +00:00
|
|
|
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
|
|
|
|
cmakeDir=$PWD/src
|
|
|
|
mkdir ../build
|
|
|
|
cd ../build
|
2020-03-24 16:10:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DALLOW_BUNDLED_EIGEN=OFF"
|
|
|
|
"-DALLOW_BUNDLED_GLEW=OFF"
|
|
|
|
"-DALLOW_BUNDLED_LIB3DS=OFF"
|
|
|
|
"-DALLOW_BUNDLED_MUPARSER=OFF"
|
|
|
|
"-DALLOW_BUNDLED_QHULL=OFF"
|
2020-08-03 00:27:15 +01:00
|
|
|
# disable when available in nixpkgs
|
2020-03-24 16:10:32 +00:00
|
|
|
"-DALLOW_BUNDLED_OPENCTM=ON"
|
|
|
|
"-DALLOW_BUNDLED_SSYNTH=ON"
|
2021-12-06 04:35:38 +00:00
|
|
|
"-DALLOW_BUNDLED_BOOST=OFF"
|
2020-03-24 16:10:32 +00:00
|
|
|
# some plugins are disabled unless these are on
|
|
|
|
"-DALLOW_BUNDLED_NEWUOA=ON"
|
|
|
|
"-DALLOW_BUNDLED_LEVMAR=ON"
|
2019-10-10 22:57:51 +01:00
|
|
|
];
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2020-08-03 00:27:15 +01:00
|
|
|
postFixup = ''
|
|
|
|
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped
|
|
|
|
'';
|
|
|
|
|
2009-05-13 11:21:29 +01:00
|
|
|
meta = {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A system for processing and editing 3D triangular meshes";
|
2020-10-02 08:58:50 +01:00
|
|
|
homepage = "https://www.meshlab.net/";
|
2021-03-13 21:18:17 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
2020-08-03 00:27:15 +01:00
|
|
|
maintainers = with lib.maintainers; [ viric ];
|
2019-10-10 22:57:51 +01:00
|
|
|
platforms = with lib.platforms; linux;
|
2009-05-13 11:21:29 +01:00
|
|
|
};
|
|
|
|
}
|