Merge pull request #299049 from nim65s/meshlab

meshlab: 2022.02 -> 2023.12

authored by Sandro and committed by GitHub 3773b498 fca59efa

+335 -39
+32 -26
pkgs/applications/graphics/meshlab/default.nix
··· 15 15 , qhull 16 16 , cmake 17 17 , cgal 18 - , boost179 18 + , boost 19 19 , mpfr 20 20 , xercesc 21 + , tbb 22 + , embree 23 + , vcg 24 + , libigl 25 + , corto 26 + , openctm 27 + , structuresynth 21 28 }: 22 29 23 30 mkDerivation rec { 24 31 pname = "meshlab"; 25 - version = "2022.02"; 32 + version = "2023.12"; 26 33 27 34 src = fetchFromGitHub { 28 35 owner = "cnr-isti-vclab"; 29 36 repo = "meshlab"; 30 37 rev = "MeshLab-${version}"; 31 - sha256 = "sha256-jcc3PfsiIeYyipteZgzd0NwZgFFgR/mMBiaInzhOcDY="; 32 - fetchSubmodules = true; # for vcglib 38 + sha256 = "sha256-AdUAWS741RQclYaSE3Tz1/I0YSinNAnfSaqef+Tib8Y="; 33 39 }; 34 40 35 41 buildInputs = [ ··· 46 52 levmar 47 53 qhull 48 54 cgal 49 - boost179 55 + boost 50 56 mpfr 51 57 xercesc 58 + tbb 59 + embree 60 + vcg 61 + libigl 62 + corto 63 + openctm 64 + structuresynth 52 65 ]; 53 66 54 67 nativeBuildInputs = [ cmake ]; 55 68 56 69 preConfigure = '' 57 - substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop 58 - cmakeDir=$PWD/src 59 - mkdir ../build 60 - cd ../build 70 + substituteAll ${./meshlab.desktop} resources/linux/meshlab.desktop 71 + substituteInPlace src/external/libigl.cmake \ 72 + --replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0 ${libigl} 73 + substituteInPlace src/external/nexus.cmake \ 74 + --replace-fail '$'{NEXUS_DIR}/src/corto ${corto.src} 75 + substituteInPlace src/external/levmar.cmake \ 76 + --replace-fail '$'{LEVMAR_LINK} ${levmar.src} \ 77 + --replace-warn "MD5 ''${LEVMAR_MD5}" "" 78 + substituteInPlace src/external/ssynth.cmake \ 79 + --replace-fail '$'{SSYNTH_LINK} ${structuresynth.src} \ 80 + --replace-warn "MD5 ''${SSYNTH_MD5}" "" 81 + substituteInPlace src/common_gui/CMakeLists.txt \ 82 + --replace-warn "MESHLAB_LIB_INSTALL_DIR" "CMAKE_INSTALL_LIBDIR" 61 83 ''; 62 84 63 85 cmakeFlags = [ 64 - "-DALLOW_BUNDLED_EIGEN=OFF" 65 - "-DALLOW_BUNDLED_GLEW=OFF" 66 - "-DALLOW_BUNDLED_LIB3DS=OFF" 67 - "-DALLOW_BUNDLED_MUPARSER=OFF" 68 - "-DALLOW_BUNDLED_QHULL=OFF" 69 - # disable when available in nixpkgs 70 - "-DALLOW_BUNDLED_OPENCTM=ON" 71 - "-DALLOW_BUNDLED_SSYNTH=ON" 72 - "-DALLOW_BUNDLED_BOOST=OFF" 73 - # some plugins are disabled unless these are on 74 - "-DALLOW_BUNDLED_NEWUOA=ON" 75 - "-DALLOW_BUNDLED_LEVMAR=ON" 76 - ]; 77 - 78 - CXXFLAGS = [ 79 - # GCC 13: error: 'int16_t' has not been declared in 'std' 80 - "-include cstdint" 86 + "-DVCGDIR=${vcg.src}" 81 87 ]; 82 88 83 89 postFixup = ''
+107
pkgs/applications/graphics/pymeshlab/default.nix
··· 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 + })
+27
pkgs/by-name/co/corto/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + cmake, 6 + }: 7 + 8 + stdenv.mkDerivation { 9 + pname = "corto"; 10 + version = "0-unstable-2024-04-05"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "cnr-isti-vclab"; 14 + repo = "corto"; 15 + rev = "d880519c490c88a39d12c31a914b6a687a7019c3"; 16 + hash = "sha256-0OUijrf+0ZNv3oYko2r8Kp9zgtg8b9RPL7DXHf15Ryc="; 17 + }; 18 + 19 + nativeBuildInputs = [ cmake ]; 20 + 21 + meta = with lib; { 22 + description = "Mesh compression library, designed for rendering and speed"; 23 + homepage = "https://github.com/cnr-isti-vclab/corto"; 24 + license = licenses.mit; 25 + maintainers = with maintainers; [ nim65s ]; 26 + }; 27 + }
+31
pkgs/by-name/li/libigl/package.nix
··· 1 + { 2 + lib, 3 + stdenvNoCC, 4 + fetchFromGitHub, 5 + }: 6 + 7 + stdenvNoCC.mkDerivation (finalAttrs: { 8 + pname = "libigl"; 9 + version = "2.5.0"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "libigl"; 13 + repo = "libigl"; 14 + rev = "v${finalAttrs.version}"; 15 + hash = "sha256-OpjkQGRiuc7kNlwgCeM4dcotTb5J+6LUn4IOe9bFbW4="; 16 + }; 17 + 18 + # We could also properly use CMake, but we would have to heavily patch it 19 + # to avoid configure-time downloads of many things. 20 + installPhase = '' 21 + mkdir -p $out/include 22 + cp -r include/igl $out/include 23 + ''; 24 + 25 + meta = with lib; { 26 + description = "Simple C++ geometry processing library"; 27 + homepage = "https://github.com/libigl/libigl"; 28 + license = licenses.mpl20; 29 + maintainers = with maintainers; [ nim65s ]; 30 + }; 31 + })
+59
pkgs/by-name/op/openctm/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + freeglut, 7 + gtk2, 8 + libGLU, 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "openctm"; 13 + version = "1.0.3"; 14 + 15 + src = fetchurl { 16 + url = "https://downloads.sourceforge.net/project/openctm/OpenCTM-${finalAttrs.version}/OpenCTM-${finalAttrs.version}-src.tar.bz2"; 17 + hash = "sha256-So0mCNlzZPfuxWt8Y3xWuTCK6YKGs+kNu3QTyQ6UPx0="; 18 + }; 19 + 20 + outputs = [ 21 + "bin" 22 + "dev" 23 + "man" 24 + "out" 25 + ]; 26 + 27 + nativeBuildInputs = [ pkg-config ]; 28 + 29 + buildInputs = [ 30 + freeglut 31 + gtk2 32 + libGLU 33 + ]; 34 + 35 + postPatch = '' 36 + substituteInPlace tools/tinyxml/Makefile.linux \ 37 + --replace-warn "-Wno-format" "-Wno-format -Wno-format-security" 38 + substituteInPlace tools/Makefile.linux \ 39 + --replace-warn "-lglut" "-lglut -lGL -lGLU" 40 + ''; 41 + 42 + makeFlags = [ 43 + "BINDIR=$(bin)/bin/" 44 + "INCDIR=$(dev)/include/" 45 + "LIBDIR=$(out)/lib/" 46 + "MAN1DIR=$(man)/share/man//man1" 47 + ]; 48 + 49 + makefile = if stdenv.isDarwin then "Makefile.macosx" else "Makefile.linux"; 50 + 51 + preInstall = "mkdir -p $bin/bin $dev/include $out/lib $man/share/man/man1"; 52 + 53 + meta = with lib; { 54 + description = "File format, software library and a tool set for compression of 3D triangle meshes"; 55 + homepage = "https://sourceforge.net/projects/openctm/"; 56 + license = licenses.zlib; 57 + maintainers = with maintainers; [ nim65s ]; 58 + }; 59 + })
+5 -13
pkgs/development/libraries/embree/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, ispc, tbb, glfw, 1 + { stdenv, lib, fetchFromGitHub, cmake, pkg-config, ispc, tbb, glfw, 2 2 openimageio, libjpeg, libpng, libpthreadstubs, libX11, glib }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 pname = "embree"; 6 - version = "3.13.5"; 6 + version = "4.3.1"; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "embree"; 10 10 repo = "embree"; 11 11 rev = "v${version}"; 12 - sha256 = "sha256-tfM4SGOFVBG0pQK9B/iN2xDaW3yjefnTtsoUad75m80="; 12 + sha256 = "sha256-gQPlk0bDn04s2pncF22m/OpIbzF3NXKkRCZbmxfXEY4="; 13 13 }; 14 14 15 - patches = [ 16 - (fetchpatch { 17 - name = "fixed-compilation-issues-for-arm-aarch64-processor-under-linux.patch"; 18 - url = "https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1.patch"; 19 - hash = "sha256-l9S4PBk+yQUypQ22l05daD0ruouZKE4VHkGvzKxkH4o="; 20 - }) 21 - ]; 22 - 23 15 postPatch = '' 24 16 # Fix duplicate /nix/store/.../nix/store/.../ paths 25 17 sed -i "s|SET(EMBREE_ROOT_DIR .*)|set(EMBREE_ROOT_DIR $out)|" \ 26 18 common/cmake/embree-config.cmake 27 19 sed -i "s|$""{EMBREE_ROOT_DIR}/||" common/cmake/embree-config.cmake 28 - substituteInPlace common/math/math.h --replace 'defined(__MACOSX__) && !defined(__INTEL_COMPILER)' 0 29 - substituteInPlace common/math/math.h --replace 'defined(__WIN32__) || defined(__FreeBSD__)' 'defined(__WIN32__) || defined(__FreeBSD__) || defined(__MACOSX__)' 20 + substituteInPlace common/math/emath.h --replace 'defined(__MACOSX__) && !defined(__INTEL_COMPILER)' 0 21 + substituteInPlace common/math/emath.h --replace 'defined(__WIN32__) || defined(__FreeBSD__)' 'defined(__WIN32__) || defined(__FreeBSD__) || defined(__MACOSX__)' 30 22 ''; 31 23 32 24 cmakeFlags = [
+61
pkgs/development/libraries/structuresynth/default.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + cmake, 7 + qtbase, 8 + wrapQtAppsHook, 9 + libGL, 10 + libGLU, 11 + }: 12 + 13 + stdenv.mkDerivation (finalAttrs: { 14 + pname = "structuresynth"; 15 + version = "1.5.1"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "alemuntoni"; 19 + repo = "structuresynth"; 20 + rev = finalAttrs.version; 21 + hash = "sha256-uFz4WPwA586B/5p+DUJ/W8KzbHLBhLIwP6mySZJ1vPY="; 22 + }; 23 + 24 + patches = [ 25 + # This PR in 2 commits allow packaging of this project as standalone. 26 + # It was merged upstream, so those 2 patches can be removed on next release. 27 + (fetchpatch { 28 + name = "shared-lib.patch"; 29 + url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/fdb87c55a03c6a0faa4335de5d29f0fb547b6102.patch"; 30 + hash = "sha256-/66x8HGyNhGwoxsbV+QIRFYQNuFSHYXNYkJzAn4jyJI="; 31 + }) 32 + (fetchpatch { 33 + name = "install-project.patch"; 34 + url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/f96a90f6a4c60e9e0316edd20ea77674a2b764a7.patch"; 35 + hash = "sha256-cSZAL1N2/Gd0x+9UkTUQxqVlb2m2MM8AA1Zzlo6S35w="; 36 + }) 37 + ]; 38 + 39 + outputs = [ 40 + "dev" 41 + "out" 42 + ]; 43 + 44 + buildInputs = [ 45 + libGL 46 + libGLU 47 + qtbase 48 + ]; 49 + 50 + nativeBuildInputs = [ 51 + cmake 52 + wrapQtAppsHook 53 + ]; 54 + 55 + meta = with lib; { 56 + description = "Generate 3D structures by specifying a design grammar"; 57 + homepage = "https://github.com/alemuntoni/StructureSynth"; 58 + license = licenses.lgpl21; 59 + maintainers = with maintainers; [ nim65s ]; 60 + }; 61 + })
+9
pkgs/development/python-modules/openusd/default.nix
··· 9 9 draco, 10 10 embree, 11 11 fetchFromGitHub, 12 + fetchpatch, 12 13 flex, 13 14 git, 14 15 graphviz-nox, ··· 62 63 outputs = [ "out" ] ++ lib.optional withDocs "doc"; 63 64 64 65 format = "other"; 66 + 67 + patches = [ 68 + (fetchpatch { 69 + name = "port-to-embree-4.patch"; 70 + url = "https://github.com/PixarAnimationStudios/OpenUSD/pull/2266/commits/4b6c23d459c602fdac5e0ebc9b7722cbd5475e86.patch"; 71 + hash = "sha256-yjqdGAVqfEsOX1W/tG6c+GgQLYya5U9xgUe/sNIuDbw="; 72 + }) 73 + ]; 65 74 66 75 cmakeFlags = [ 67 76 "-DPXR_BUILD_ALEMBIC_PLUGIN=ON"
+2
pkgs/top-level/all-packages.nix
··· 24706 24706 streamlink = callPackage ../applications/video/streamlink { }; 24707 24707 streamlink-twitch-gui-bin = callPackage ../applications/video/streamlink-twitch-gui/bin.nix { }; 24708 24708 24709 + structuresynth = libsForQt5.callPackage ../development/libraries/structuresynth { }; 24710 + 24709 24711 sub-batch = callPackage ../applications/video/sub-batch { }; 24710 24712 24711 24713 subdl = callPackage ../applications/video/subdl { };
+2
pkgs/top-level/python-packages.nix
··· 9673 9673 9674 9674 pypemicro = callPackage ../development/python-modules/pypemicro { }; 9675 9675 9676 + pymeshlab = toPythonModule (pkgs.libsForQt5.callPackage ../applications/graphics/pymeshlab { }); 9677 + 9676 9678 pyprecice = callPackage ../development/python-modules/pyprecice { }; 9677 9679 9678 9680 pyprobables = callPackage ../development/python-modules/pyprobables { };