mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
81 lines
1.6 KiB
Nix
81 lines
1.6 KiB
Nix
{ mkDerivation
|
|
, lib
|
|
, fetchFromGitHub
|
|
, libGLU
|
|
, qtbase
|
|
, qtscript
|
|
, qtxmlpatterns
|
|
, lib3ds
|
|
, bzip2
|
|
, muparser
|
|
, eigen
|
|
, glew
|
|
, gmp
|
|
, levmar
|
|
, qhull
|
|
, cmake
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "meshlab";
|
|
version = "2020.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cnr-isti-vclab";
|
|
repo = "meshlab";
|
|
rev = "Meshlab-${version}";
|
|
sha256 = "QrnqXEVqI1ADUYWalZ0h/0+xS+gDZTinm0weT39onw0=";
|
|
fetchSubmodules = true; # for vcglib
|
|
};
|
|
|
|
buildInputs = [
|
|
libGLU
|
|
qtbase
|
|
qtscript
|
|
qtxmlpatterns
|
|
lib3ds
|
|
bzip2
|
|
muparser
|
|
eigen
|
|
glew
|
|
gmp
|
|
levmar
|
|
qhull
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
preConfigure = ''
|
|
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
|
|
cmakeDir=$PWD/src
|
|
mkdir ../build
|
|
cd ../build
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DALLOW_BUNDLED_EIGEN=OFF"
|
|
"-DALLOW_BUNDLED_GLEW=OFF"
|
|
"-DALLOW_BUNDLED_LIB3DS=OFF"
|
|
"-DALLOW_BUNDLED_MUPARSER=OFF"
|
|
"-DALLOW_BUNDLED_QHULL=OFF"
|
|
# disable when available in nixpkgs
|
|
"-DALLOW_BUNDLED_OPENCTM=ON"
|
|
"-DALLOW_BUNDLED_SSYNTH=ON"
|
|
# some plugins are disabled unless these are on
|
|
"-DALLOW_BUNDLED_NEWUOA=ON"
|
|
"-DALLOW_BUNDLED_LEVMAR=ON"
|
|
];
|
|
|
|
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";
|
|
homepage = "https://www.meshlab.net/";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ viric ];
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|