2010-01-21 14:39:53 +00:00
|
|
|
{stdenv, fetchurl, qt, bzip2, lib3ds, levmar, muparser, unzip}:
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2010-01-21 14:39:53 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-08-30 07:18:24 +01:00
|
|
|
name = "meshlab-1.3.2";
|
2009-05-13 11:21:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-08-30 07:18:24 +01:00
|
|
|
url = "mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.3.2/MeshLabSrc_AllInc_v132.tgz";
|
|
|
|
sha256 = "d57f0a99a55421aac54a66e2475d48f00f7b1752f9587cd69cf9b5b9c1a519b1";
|
2009-05-13 11:21:29 +01:00
|
|
|
};
|
|
|
|
|
2010-07-07 16:10:05 +01:00
|
|
|
# I don't know why I need this; without this, the rpath set at the beginning of the
|
|
|
|
# buildPhase gets removed from the 'meshlab' binary
|
|
|
|
dontPatchELF = true;
|
2009-05-13 11:21:29 +01:00
|
|
|
|
2010-07-07 16:10:05 +01:00
|
|
|
buildPhase = ''
|
2012-08-30 07:18:24 +01:00
|
|
|
mkdir -p "$out/include"
|
|
|
|
cp -r vcglib "$out/include"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$out/include/vcglib"
|
2010-07-07 16:10:05 +01:00
|
|
|
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
2010-01-21 14:39:53 +00:00
|
|
|
cd meshlab/src
|
2009-05-13 11:21:29 +01:00
|
|
|
pushd external
|
2010-07-07 16:10:05 +01:00
|
|
|
qmake -recursive external.pro
|
|
|
|
make
|
2009-05-13 11:21:29 +01:00
|
|
|
popd
|
2012-08-30 07:18:24 +01:00
|
|
|
qmake -recursive meshlab_full.pro
|
2009-05-13 11:21:29 +01:00
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/opt/meshlab $out/bin $out/lib
|
2010-07-07 16:10:05 +01:00
|
|
|
pushd distrib
|
|
|
|
cp -R * $out/opt/meshlab
|
2009-05-13 11:21:29 +01:00
|
|
|
popd
|
|
|
|
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
|
|
|
'';
|
|
|
|
|
2012-08-30 07:18:24 +01:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
2010-07-07 16:10:05 +01:00
|
|
|
buildInputs = [ qt unzip ];
|
2009-05-13 11:21:29 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "System for the processing and editing of unstructured 3D triangular meshes";
|
|
|
|
homepage = http://meshlab.sourceforge.net/;
|
|
|
|
license = "GPLv2+";
|
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
|
|
|
};
|
|
|
|
}
|