-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meshlab-unstable: init at 2023.12-unstable-2025-02-21
- Loading branch information
Showing
3 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
127 changes: 127 additions & 0 deletions
127
pkgs/applications/graphics/meshlab-unstable/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
mkDerivation, | ||
lib, | ||
fetchFromGitHub, | ||
libGLU, | ||
qtbase, | ||
qtscript, | ||
qtxmlpatterns, | ||
lib3ds, | ||
bzip2, | ||
muparser, | ||
eigen, | ||
glew, | ||
gmp, | ||
levmar, | ||
qhull, | ||
cmake, | ||
cgal, | ||
boost, | ||
mpfr, | ||
xercesc, | ||
tbb, | ||
embree, | ||
libigl, | ||
corto, | ||
openctm, | ||
structuresynth, | ||
}: | ||
|
||
let | ||
tinygltf-src = fetchFromGitHub { | ||
owner = "syoyo"; | ||
repo = "tinygltf"; | ||
rev = "v2.6.3"; | ||
hash = "sha256-IyezvHzgLRyc3z8HdNsQMqDEhP+Ytw0stFNak3C8lTo="; | ||
}; | ||
# requires submodules to build | ||
lib3mf-src = fetchFromGitHub { | ||
owner = "3MFConsortium"; | ||
repo = "lib3mf"; | ||
rev = "v2.3.2"; | ||
fetchSubmodules = true; | ||
hash = "sha256-pKjnN9H6/A2zPvzpFed65J+mnNwG/dkSE2/pW7IlN58="; | ||
}; | ||
in | ||
mkDerivation { | ||
pname = "meshlab-unstable"; | ||
version = "2023.12-unstable-2025-02-21"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "cnr-isti-vclab"; | ||
repo = "meshlab"; | ||
# note that this is in branch devel | ||
rev = "72142583980b6dbfc5b85c6cca226a72f48497a9"; | ||
sha256 = "1q7qga4d82pvpcbsp9pi2i7nzdbflhp6q0d3y31kpch9r3r9pzks"; | ||
# needed for an updated version of vcg in their submodule | ||
fetchSubmodules = true; | ||
}; | ||
|
||
buildInputs = [ | ||
libGLU | ||
qtbase | ||
qtscript | ||
qtxmlpatterns | ||
lib3ds | ||
bzip2 | ||
muparser | ||
eigen | ||
glew | ||
gmp | ||
levmar | ||
qhull | ||
cgal | ||
boost | ||
mpfr | ||
xercesc | ||
tbb | ||
embree | ||
libigl | ||
corto | ||
openctm | ||
structuresynth | ||
]; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
preConfigure = '' | ||
mkdir src/external/downloads | ||
cp -r --no-preserve=mode,ownership ${lib3mf-src} src/external/downloads/lib3mf-2.3.2 | ||
substituteAll ${./meshlab.desktop} resources/linux/meshlab.desktop | ||
substituteInPlace src/external/tinygltf.cmake \ | ||
--replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/tinygltf-2.6.3 ${tinygltf-src} | ||
substituteInPlace src/external/libigl.cmake \ | ||
--replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-'$'{LIBIGL_VER} ${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" | ||
''; | ||
|
||
postFixup = '' | ||
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped | ||
patchelf --add-needed $out/lib/meshlab/lib3mf.so $out/lib/meshlab/plugins/libio_3mf.so | ||
''; | ||
|
||
# display a black screen on wayland, so force XWayland for now. | ||
# Might be fixed when upstream will be ready for Qt6. | ||
qtWrapperArgs = [ | ||
"--set QT_QPA_PLATFORM xcb" | ||
]; | ||
|
||
meta = { | ||
description = "System for processing and editing 3D triangular meshes (unstable)"; | ||
mainProgram = "meshlab"; | ||
homepage = "https://www.meshlab.net/"; | ||
license = lib.licenses.gpl3Only; | ||
maintainers = with lib.maintainers; [ pca006132 ]; | ||
platforms = with lib.platforms; linux; | ||
}; | ||
} |
14 changes: 14 additions & 0 deletions
14
pkgs/applications/graphics/meshlab-unstable/meshlab.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Desktop Entry] | ||
Name=MeshLab | ||
Version=@version@ | ||
Name[en_GB]=MeshLab | ||
GenericName=Mesh processing | ||
GenericName[en_GB]=Mesh processing | ||
Comment=View and process meshes | ||
Type=Application | ||
Exec=@out@/bin/meshlab %U | ||
TryExec=@out@/bin/meshlab | ||
Icon=@out@/share/icons/hicolor/meshlab.png | ||
Terminal=false | ||
MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf; | ||
Categories=Graphics;3DGraphics;Viewer;Qt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters