-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299049 from nim65s/meshlab
meshlab: 2022.02 -> 2023.12
- Loading branch information
Showing
10 changed files
with
335 additions
and
39 deletions.
There are no files selected for viewing
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
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,107 @@ | ||
{ stdenv | ||
, lib | ||
, fetchFromGitHub | ||
, libGLU | ||
, qtbase | ||
, qtscript | ||
, qtxmlpatterns | ||
, lib3ds | ||
, bzip2 | ||
, muparser | ||
, eigen | ||
, glew | ||
, gmp | ||
, levmar | ||
, qhull | ||
, cmake | ||
, cgal | ||
, boost | ||
, mpfr | ||
, xercesc | ||
, tbb | ||
, embree | ||
, vcg | ||
, libigl | ||
, corto | ||
, openctm | ||
, structuresynth | ||
, wrapQtAppsHook | ||
, python3Packages | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "pymeshlab"; | ||
version = "2023.12"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "cnr-isti-vclab"; | ||
repo = "pymeshlab"; | ||
rev = "v${finalAttrs.version}"; | ||
hash = "sha256-IOlRdXoUPOJt67g3HqsLchV5aL+JUEks2y1Sy+wpwsg="; | ||
fetchSubmodules = true; | ||
}; | ||
|
||
buildInputs = [ | ||
libGLU | ||
qtbase | ||
qtscript | ||
qtxmlpatterns | ||
lib3ds | ||
bzip2 | ||
muparser | ||
eigen | ||
glew | ||
gmp | ||
levmar | ||
qhull | ||
cgal | ||
boost | ||
mpfr | ||
xercesc | ||
tbb | ||
embree | ||
vcg | ||
libigl | ||
corto | ||
structuresynth | ||
openctm | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
wrapQtAppsHook | ||
python3Packages.pybind11 | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
python3Packages.numpy | ||
]; | ||
|
||
preConfigure = '' | ||
substituteInPlace src/meshlab/src/external/libigl.cmake \ | ||
--replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0 ${libigl} | ||
substituteInPlace src/meshlab/src/external/nexus.cmake \ | ||
--replace-fail '$'{NEXUS_DIR}/src/corto ${corto.src} | ||
substituteInPlace src/meshlab/src/external/levmar.cmake \ | ||
--replace-fail '$'{LEVMAR_LINK} ${levmar.src} \ | ||
--replace-warn "MD5 ''${LEVMAR_MD5}" "" | ||
substituteInPlace src/meshlab/src/external/ssynth.cmake \ | ||
--replace-fail '$'{SSYNTH_LINK} ${structuresynth.src} \ | ||
--replace-warn "MD5 ''${SSYNTH_MD5}" "" | ||
export cmakeFlags="cmakeFlags | ||
-DCMAKE_INSTALL_PREFIX=$out/${python3Packages.python.sitePackages}/pymeshlab | ||
" | ||
''; | ||
|
||
cmakeFlags = [ | ||
"-DVCGDIR=${vcg.src}" | ||
]; | ||
|
||
meta = { | ||
description = "The open source mesh processing python library"; | ||
homepage = "https://github.com/cnr-isti-vclab/PyMeshLab"; | ||
license = lib.licenses.gpl3Only; | ||
maintainers = with lib.maintainers; [ nim65s ]; | ||
platforms = with lib.platforms; linux; | ||
}; | ||
}) |
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,27 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "corto"; | ||
version = "0-unstable-2024-04-05"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "cnr-isti-vclab"; | ||
repo = "corto"; | ||
rev = "d880519c490c88a39d12c31a914b6a687a7019c3"; | ||
hash = "sha256-0OUijrf+0ZNv3oYko2r8Kp9zgtg8b9RPL7DXHf15Ryc="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
meta = with lib; { | ||
description = "Mesh compression library, designed for rendering and speed"; | ||
homepage = "https://github.com/cnr-isti-vclab/corto"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ nim65s ]; | ||
}; | ||
} |
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,31 @@ | ||
{ | ||
lib, | ||
stdenvNoCC, | ||
fetchFromGitHub, | ||
}: | ||
|
||
stdenvNoCC.mkDerivation (finalAttrs: { | ||
pname = "libigl"; | ||
version = "2.5.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "libigl"; | ||
repo = "libigl"; | ||
rev = "v${finalAttrs.version}"; | ||
hash = "sha256-OpjkQGRiuc7kNlwgCeM4dcotTb5J+6LUn4IOe9bFbW4="; | ||
}; | ||
|
||
# We could also properly use CMake, but we would have to heavily patch it | ||
# to avoid configure-time downloads of many things. | ||
installPhase = '' | ||
mkdir -p $out/include | ||
cp -r include/igl $out/include | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Simple C++ geometry processing library"; | ||
homepage = "https://github.com/libigl/libigl"; | ||
license = licenses.mpl20; | ||
maintainers = with maintainers; [ nim65s ]; | ||
}; | ||
}) |
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,59 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchurl, | ||
pkg-config, | ||
freeglut, | ||
gtk2, | ||
libGLU, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "openctm"; | ||
version = "1.0.3"; | ||
|
||
src = fetchurl { | ||
url = "https://downloads.sourceforge.net/project/openctm/OpenCTM-${finalAttrs.version}/OpenCTM-${finalAttrs.version}-src.tar.bz2"; | ||
hash = "sha256-So0mCNlzZPfuxWt8Y3xWuTCK6YKGs+kNu3QTyQ6UPx0="; | ||
}; | ||
|
||
outputs = [ | ||
"bin" | ||
"dev" | ||
"man" | ||
"out" | ||
]; | ||
|
||
nativeBuildInputs = [ pkg-config ]; | ||
|
||
buildInputs = [ | ||
freeglut | ||
gtk2 | ||
libGLU | ||
]; | ||
|
||
postPatch = '' | ||
substituteInPlace tools/tinyxml/Makefile.linux \ | ||
--replace-warn "-Wno-format" "-Wno-format -Wno-format-security" | ||
substituteInPlace tools/Makefile.linux \ | ||
--replace-warn "-lglut" "-lglut -lGL -lGLU" | ||
''; | ||
|
||
makeFlags = [ | ||
"BINDIR=$(bin)/bin/" | ||
"INCDIR=$(dev)/include/" | ||
"LIBDIR=$(out)/lib/" | ||
"MAN1DIR=$(man)/share/man//man1" | ||
]; | ||
|
||
makefile = if stdenv.isDarwin then "Makefile.macosx" else "Makefile.linux"; | ||
|
||
preInstall = "mkdir -p $bin/bin $dev/include $out/lib $man/share/man/man1"; | ||
|
||
meta = with lib; { | ||
description = "File format, software library and a tool set for compression of 3D triangle meshes"; | ||
homepage = "https://sourceforge.net/projects/openctm/"; | ||
license = licenses.zlib; | ||
maintainers = with maintainers; [ nim65s ]; | ||
}; | ||
}) |
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
Oops, something went wrong.