ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
95 lines
1.8 KiB
Nix
95 lines
1.8 KiB
Nix
{ mkDerivation
|
|
, lib
|
|
, fetchFromGitHub
|
|
, libGLU
|
|
, qtbase
|
|
, qtscript
|
|
, qtxmlpatterns
|
|
, lib3ds
|
|
, bzip2
|
|
, muparser
|
|
, eigen
|
|
, glew
|
|
, gmp
|
|
, levmar
|
|
, qhull
|
|
, cmake
|
|
, cgal
|
|
, boost179
|
|
, mpfr
|
|
, xercesc
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "meshlab";
|
|
version = "2022.02";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cnr-isti-vclab";
|
|
repo = "meshlab";
|
|
rev = "MeshLab-${version}";
|
|
sha256 = "sha256-jcc3PfsiIeYyipteZgzd0NwZgFFgR/mMBiaInzhOcDY=";
|
|
fetchSubmodules = true; # for vcglib
|
|
};
|
|
|
|
buildInputs = [
|
|
libGLU
|
|
qtbase
|
|
qtscript
|
|
qtxmlpatterns
|
|
lib3ds
|
|
bzip2
|
|
muparser
|
|
eigen
|
|
glew
|
|
gmp
|
|
levmar
|
|
qhull
|
|
cgal
|
|
boost179
|
|
mpfr
|
|
xercesc
|
|
];
|
|
|
|
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"
|
|
"-DALLOW_BUNDLED_BOOST=OFF"
|
|
# some plugins are disabled unless these are on
|
|
"-DALLOW_BUNDLED_NEWUOA=ON"
|
|
"-DALLOW_BUNDLED_LEVMAR=ON"
|
|
];
|
|
|
|
CXXFLAGS = [
|
|
# GCC 13: error: 'int16_t' has not been declared in 'std'
|
|
"-include cstdint"
|
|
];
|
|
|
|
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";
|
|
mainProgram = "meshlab";
|
|
homepage = "https://www.meshlab.net/";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ viric ];
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|