nixpkgs/pkgs/applications/graphics/meshlab/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

102 lines
2.0 KiB
Nix
Raw Normal View History

2020-08-02 23:27:15 +00:00
{ mkDerivation
, lib
, fetchFromGitHub
, libGLU
, qtbase
, qtscript
, qtxmlpatterns
, lib3ds
, bzip2
, muparser
2020-03-24 16:10:32 +00:00
, eigen
, glew
, gmp
, levmar
2020-03-24 16:10:32 +00:00
, qhull
, cmake
2023-12-18 06:15:50 +00:00
, cgal
2024-03-26 00:05:14 +00:00
, boost
, mpfr
, xercesc
2024-03-26 00:05:14 +00:00
, tbb
, embree
, vcg
, libigl
, corto
, openctm
, structuresynth
}:
2020-03-24 16:10:32 +00:00
mkDerivation rec {
pname = "meshlab";
2024-03-26 00:05:14 +00:00
version = "2023.12";
2018-08-14 08:50:28 +00:00
2020-03-24 16:10:32 +00:00
src = fetchFromGitHub {
owner = "cnr-isti-vclab";
repo = "meshlab";
rev = "MeshLab-${version}";
2024-03-26 00:05:14 +00:00
sha256 = "sha256-AdUAWS741RQclYaSE3Tz1/I0YSinNAnfSaqef+Tib8Y=";
};
buildInputs = [
libGLU
qtbase
qtscript
qtxmlpatterns
lib3ds
bzip2
muparser
2020-03-24 16:10:32 +00:00
eigen
glew
gmp
levmar
2020-03-24 16:10:32 +00:00
qhull
2023-12-18 06:15:50 +00:00
cgal
2024-03-26 00:05:14 +00:00
boost
mpfr
xercesc
2024-03-26 00:05:14 +00:00
tbb
embree
vcg
libigl
corto
openctm
structuresynth
2020-03-24 16:10:32 +00:00
];
nativeBuildInputs = [ cmake ];
preConfigure = ''
2024-03-26 00:05:14 +00:00
substituteAll ${./meshlab.desktop} resources/linux/meshlab.desktop
substituteInPlace src/external/libigl.cmake \
--replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0 ${libigl}
substituteInPlace src/external/nexus.cmake \
--replace-fail '$'{NEXUS_DIR}/src/corto ${corto.src}
substituteInPlace src/external/levmar.cmake \
--replace-fail '$'{LEVMAR_LINK} ${levmar.src} \
--replace-warn "MD5 ''${LEVMAR_MD5}" ""
substituteInPlace src/external/ssynth.cmake \
--replace-fail '$'{SSYNTH_LINK} ${structuresynth.src} \
--replace-warn "MD5 ''${SSYNTH_MD5}" ""
substituteInPlace src/common_gui/CMakeLists.txt \
--replace-warn "MESHLAB_LIB_INSTALL_DIR" "CMAKE_INSTALL_LIBDIR"
2020-03-24 16:10:32 +00:00
'';
cmakeFlags = [
2024-03-26 00:05:14 +00:00
"-DVCGDIR=${vcg.src}"
2024-01-09 20:57:06 +00:00
];
2020-08-02 23:27:15 +00:00
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";
mainProgram = "meshlab";
homepage = "https://www.meshlab.net/";
2021-03-13 21:18:17 +00:00
license = lib.licenses.gpl3Only;
2020-08-02 23:27:15 +00:00
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux;
};
}