3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/meshlab/default.nix

81 lines
1.6 KiB
Nix
Raw Normal View History

2020-08-03 00:27:15 +01:00
{ mkDerivation
, lib
, fetchFromGitHub
, libGLU
, qtbase
, qtscript
, qtxmlpatterns
, lib3ds
, bzip2
, muparser
2020-03-24 16:10:32 +00:00
, eigen
, glew
, gmp
, levmar
2020-03-24 16:10:32 +00:00
, qhull
, cmake
}:
2020-03-24 16:10:32 +00:00
mkDerivation rec {
pname = "meshlab";
2021-03-13 21:18:17 +00:00
version = "2020.12";
2018-08-14 09:50:28 +01:00
2020-03-24 16:10:32 +00:00
src = fetchFromGitHub {
owner = "cnr-isti-vclab";
repo = "meshlab";
2020-08-03 00:27:15 +01:00
rev = "Meshlab-${version}";
2021-03-13 21:18:17 +00:00
sha256 = "QrnqXEVqI1ADUYWalZ0h/0+xS+gDZTinm0weT39onw0=";
2020-03-24 16:10:32 +00:00
fetchSubmodules = true; # for vcglib
};
buildInputs = [
libGLU
qtbase
qtscript
qtxmlpatterns
lib3ds
bzip2
muparser
2020-03-24 16:10:32 +00:00
eigen
glew
gmp
levmar
2020-03-24 16:10:32 +00:00
qhull
];
nativeBuildInputs = [ cmake ];
preConfigure = ''
2021-03-13 21:18:17 +00:00
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
cmakeDir=$PWD/src
mkdir ../build
cd ../build
2020-03-24 16:10:32 +00:00
'';
cmakeFlags = [
"-DALLOW_BUNDLED_EIGEN=OFF"
"-DALLOW_BUNDLED_GLEW=OFF"
"-DALLOW_BUNDLED_LIB3DS=OFF"
"-DALLOW_BUNDLED_MUPARSER=OFF"
"-DALLOW_BUNDLED_QHULL=OFF"
2020-08-03 00:27:15 +01:00
# disable when available in nixpkgs
2020-03-24 16:10:32 +00:00
"-DALLOW_BUNDLED_OPENCTM=ON"
"-DALLOW_BUNDLED_SSYNTH=ON"
# some plugins are disabled unless these are on
"-DALLOW_BUNDLED_NEWUOA=ON"
"-DALLOW_BUNDLED_LEVMAR=ON"
];
2020-08-03 00:27:15 +01:00
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/";
2021-03-13 21:18:17 +00:00
license = lib.licenses.gpl3Only;
2020-08-03 00:27:15 +01:00
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux;
};
}