2018-08-14 10:50:28 +02:00
|
|
|
{ fetchFromGitHub, libGLU, llvmPackages, qtbase, qtscript, qtxmlpatterns }:
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2017-12-04 14:59:25 +01:00
|
|
|
let
|
2018-08-14 10:50:28 +02:00
|
|
|
meshlabRev = "d596d7c086c51fbdfb56050f9c30b55dd0286d4c";
|
|
|
|
vcglibRev = "6c3c940e34327322507c703889f9f1cfa73ab183";
|
|
|
|
# ^ this should be the latest commit in the vcglib devel branch at the time of the meshlab revision
|
|
|
|
|
|
|
|
stdenv = llvmPackages.stdenv; # only building with clang seems to be tested upstream
|
2017-12-04 14:59:25 +01:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-14 10:50:28 +02:00
|
|
|
name = "meshlab-20180627-beta";
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2017-12-04 14:59:25 +01:00
|
|
|
srcs =
|
|
|
|
[
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "meshlab";
|
|
|
|
rev = meshlabRev;
|
2018-08-14 10:50:28 +02:00
|
|
|
sha256 = "0xi7wiyy0yi545l5qvccbqahlcsf70mhx829gf7bq29640si4rax";
|
2017-12-04 14:59:25 +01:00
|
|
|
name = "meshlab-${meshlabRev}";
|
|
|
|
})
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "cnr-isti-vclab";
|
|
|
|
repo = "vcglib";
|
|
|
|
rev = vcglibRev;
|
2018-08-14 10:50:28 +02:00
|
|
|
sha256 = "0jfgjvf21y9ncmyr7caipy3ardhig7hh9z8miy885c99b925hhwd";
|
2017-12-04 14:59:25 +01:00
|
|
|
name = "vcglib-${vcglibRev}";
|
|
|
|
})
|
|
|
|
];
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2017-12-04 14:59:25 +01:00
|
|
|
sourceRoot = "meshlab-${meshlabRev}";
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2017-12-04 14:59:25 +01:00
|
|
|
enableParallelBuilding = true;
|
2016-02-12 13:50:38 +01:00
|
|
|
|
2018-08-14 10:50:28 +02:00
|
|
|
patches = [ ./fix-20180627-beta.patch ];
|
|
|
|
|
2010-07-07 17:10:05 +02:00
|
|
|
buildPhase = ''
|
2017-12-04 14:59:25 +01:00
|
|
|
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
|
|
|
mv ../vcglib-${vcglibRev} ../vcglib
|
|
|
|
|
|
|
|
cd src
|
2010-07-07 17:10:05 +02:00
|
|
|
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
2018-08-14 10:50:28 +02:00
|
|
|
export QMAKESPEC="linux-clang"
|
2017-12-04 14:59:25 +01:00
|
|
|
|
2009-05-13 12:21:29 +02:00
|
|
|
pushd external
|
2010-07-07 17:10:05 +02:00
|
|
|
qmake -recursive external.pro
|
2017-12-04 14:59:25 +01:00
|
|
|
buildPhase
|
2009-05-13 12:21:29 +02:00
|
|
|
popd
|
2012-08-30 08:18:24 +02:00
|
|
|
qmake -recursive meshlab_full.pro
|
2017-12-04 14:59:25 +01:00
|
|
|
buildPhase
|
2009-05-13 12:21:29 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-12-04 14:59:25 +01:00
|
|
|
mkdir -p $out/opt/meshlab $out/bin
|
|
|
|
cp -Rv distrib/* $out/opt/meshlab
|
2009-05-13 12:21:29 +02:00
|
|
|
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
2017-12-04 14:59:25 +01:00
|
|
|
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
2009-05-13 12:21:29 +02:00
|
|
|
'';
|
|
|
|
|
2018-08-14 10:50:28 +02:00
|
|
|
buildInputs = [ libGLU llvmPackages.openmp qtbase qtscript qtxmlpatterns ];
|
2009-05-13 12:21:29 +02:00
|
|
|
|
|
|
|
meta = {
|
2017-12-04 14:59:25 +01:00
|
|
|
description = "A system for processing and editing 3D triangular meshes.";
|
|
|
|
homepage = http://www.meshlab.net/;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2010-01-21 10:49:10 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2009-05-13 12:21:29 +02:00
|
|
|
};
|
|
|
|
}
|