Skip to content

Commit fc7d8b3

Browse files
pymeshlab: init at 2023.12
Co-authored-by: Sandro <[email protected]>
1 parent 7490036 commit fc7d8b3

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{ stdenv
2+
, lib
3+
, fetchFromGitHub
4+
, libGLU
5+
, qtbase
6+
, qtscript
7+
, qtxmlpatterns
8+
, lib3ds
9+
, bzip2
10+
, muparser
11+
, eigen
12+
, glew
13+
, gmp
14+
, levmar
15+
, qhull
16+
, cmake
17+
, cgal
18+
, boost
19+
, mpfr
20+
, xercesc
21+
, tbb
22+
, embree
23+
, vcg
24+
, libigl
25+
, corto
26+
, openctm
27+
, structuresynth
28+
, wrapQtAppsHook
29+
, python3Packages
30+
}:
31+
32+
stdenv.mkDerivation (finalAttrs: {
33+
pname = "pymeshlab";
34+
version = "2023.12";
35+
36+
src = fetchFromGitHub {
37+
owner = "cnr-isti-vclab";
38+
repo = "pymeshlab";
39+
rev = "v${finalAttrs.version}";
40+
hash = "sha256-IOlRdXoUPOJt67g3HqsLchV5aL+JUEks2y1Sy+wpwsg=";
41+
fetchSubmodules = true;
42+
};
43+
44+
buildInputs = [
45+
libGLU
46+
qtbase
47+
qtscript
48+
qtxmlpatterns
49+
lib3ds
50+
bzip2
51+
muparser
52+
eigen
53+
glew
54+
gmp
55+
levmar
56+
qhull
57+
cgal
58+
boost
59+
mpfr
60+
xercesc
61+
tbb
62+
embree
63+
vcg
64+
libigl
65+
corto
66+
structuresynth
67+
openctm
68+
];
69+
70+
nativeBuildInputs = [
71+
cmake
72+
wrapQtAppsHook
73+
python3Packages.pybind11
74+
];
75+
76+
propagatedBuildInputs = [
77+
python3Packages.numpy
78+
];
79+
80+
preConfigure = ''
81+
substituteInPlace src/meshlab/src/external/libigl.cmake \
82+
--replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0 ${libigl}
83+
substituteInPlace src/meshlab/src/external/nexus.cmake \
84+
--replace-fail '$'{NEXUS_DIR}/src/corto ${corto.src}
85+
substituteInPlace src/meshlab/src/external/levmar.cmake \
86+
--replace-fail '$'{LEVMAR_LINK} ${levmar.src} \
87+
--replace-warn "MD5 ''${LEVMAR_MD5}" ""
88+
substituteInPlace src/meshlab/src/external/ssynth.cmake \
89+
--replace-fail '$'{SSYNTH_LINK} ${structuresynth.src} \
90+
--replace-warn "MD5 ''${SSYNTH_MD5}" ""
91+
export cmakeFlags="cmakeFlags
92+
-DCMAKE_INSTALL_PREFIX=$out/${python3Packages.python.sitePackages}/pymeshlab
93+
"
94+
'';
95+
96+
cmakeFlags = [
97+
"-DVCGDIR=${vcg.src}"
98+
];
99+
100+
meta = {
101+
description = "The open source mesh processing python library";
102+
homepage = "https://github.com/cnr-isti-vclab/PyMeshLab";
103+
license = lib.licenses.gpl3Only;
104+
maintainers = with lib.maintainers; [ nim65s ];
105+
platforms = with lib.platforms; linux;
106+
};
107+
})

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9664,6 +9664,8 @@ self: super: with self; {
96649664

96659665
pypemicro = callPackage ../development/python-modules/pypemicro { };
96669666

9667+
pymeshlab = toPythonModule (pkgs.libsForQt5.callPackage ../applications/graphics/pymeshlab { });
9668+
96679669
pyprecice = callPackage ../development/python-modules/pyprecice { };
96689670

96699671
pyprobables = callPackage ../development/python-modules/pyprobables { };

0 commit comments

Comments
 (0)