nixpkgs/pkgs/applications/graphics/meshlab/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
1.7 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
, cgal_5
, boost17x
, mpfr
, xercesc
}:
2020-03-24 16:10:32 +00:00
mkDerivation rec {
pname = "meshlab";
2022-02-24 14:15:58 +00:00
version = "2022.02";
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}";
2022-02-24 14:15:58 +00:00
sha256 = "sha256-MP+jkiV6yS1T1eWClxM56kZWLXwu0g4w/zBHy6CSL6Y=";
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
cgal_5
boost17x
mpfr
xercesc
2020-03-24 16:10:32 +00:00
];
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"
"-DALLOW_BUNDLED_BOOST=OFF"
2020-03-24 16:10:32 +00:00
# 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;
};
}