2018-02-24 12:59:47 +00:00
|
|
|
{ stdenv, fetchFromGitHub, libGLU, qtbase, qtscript, qtxmlpatterns }:
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2017-12-04 13:59:25 +00:00
|
|
|
let
|
|
|
|
meshlabRev = "5700f5474c8f90696a8925e2a209a0a8ab506662";
|
|
|
|
vcglibRev = "a8e87662b63ee9f4ded5d4699b28d74183040803";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "meshlab-2016.12";
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2017-12-04 13:59:25 +00:00
|
|
|
srcs =
|
|
|
|
[
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "meshlab";
|
|
|
|
rev = meshlabRev;
|
|
|
|
sha256 = "0srrp7zhi86dsg4zsx1615gr26barz38zdl8s03zq6vm1dgzl3cc";
|
|
|
|
name = "meshlab-${meshlabRev}";
|
|
|
|
})
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "vcglib";
|
|
|
|
rev = vcglibRev;
|
|
|
|
sha256 = "0jh8jc8rn7rci8qr3q03q574fk2hsc3rllysck41j8xkr3rmxz2f";
|
|
|
|
name = "vcglib-${vcglibRev}";
|
|
|
|
})
|
|
|
|
];
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2017-12-04 13:59:25 +00:00
|
|
|
sourceRoot = "meshlab-${meshlabRev}";
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2017-12-04 13:59:25 +00:00
|
|
|
patches = [ ./fix-2016.02.patch ];
|
2014-04-20 10:30:06 +01:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2017-12-04 13:59:25 +00:00
|
|
|
enableParallelBuilding = true;
|
2016-02-12 12:50:38 +00:00
|
|
|
|
2010-07-07 16:10:05 +01:00
|
|
|
buildPhase = ''
|
2017-12-04 13:59:25 +00:00
|
|
|
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
|
|
|
mv ../vcglib-${vcglibRev} ../vcglib
|
|
|
|
|
|
|
|
cd src
|
2010-07-07 16:10:05 +01:00
|
|
|
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
2017-12-04 13:59:25 +00:00
|
|
|
|
2009-05-13 11:21:29 +01:00
|
|
|
pushd external
|
2010-07-07 16:10:05 +01:00
|
|
|
qmake -recursive external.pro
|
2017-12-04 13:59:25 +00:00
|
|
|
buildPhase
|
2009-05-13 11:21:29 +01:00
|
|
|
popd
|
2012-08-30 07:18:24 +01:00
|
|
|
qmake -recursive meshlab_full.pro
|
2017-12-04 13:59:25 +00:00
|
|
|
buildPhase
|
2009-05-13 11:21:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-12-04 13:59:25 +00:00
|
|
|
mkdir -p $out/opt/meshlab $out/bin
|
|
|
|
cp -Rv distrib/* $out/opt/meshlab
|
2009-05-13 11:21:29 +01:00
|
|
|
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
2017-12-04 13:59:25 +00:00
|
|
|
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
2009-05-13 11:21:29 +01:00
|
|
|
'';
|
|
|
|
|
2018-02-24 12:59:47 +00:00
|
|
|
buildInputs = [ libGLU qtbase qtscript qtxmlpatterns ];
|
2009-05-13 11:21:29 +01:00
|
|
|
|
|
|
|
meta = {
|
2017-12-04 13:59:25 +00:00
|
|
|
description = "A system for processing and editing 3D triangular meshes.";
|
|
|
|
homepage = http://www.meshlab.net/;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2010-01-21 09:49:10 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2009-05-13 11:21:29 +01:00
|
|
|
};
|
|
|
|
}
|