2018-02-24 14:12:44 +01:00
|
|
|
{ fetchurl, stdenv, cmake, wxGTK, itk, libGLU_combined, libXft, libXext, libXi, zlib, libXmu,
|
2010-03-04 15:44:43 +01:00
|
|
|
libuuid }:
|
2010-03-02 00:31:35 +01:00
|
|
|
|
2010-03-02 08:45:22 +01:00
|
|
|
assert (stdenv ? glibc);
|
|
|
|
|
2010-03-02 00:31:35 +01:00
|
|
|
stdenv.mkDerivation {
|
2013-07-14 00:29:50 +02:00
|
|
|
name = "seg3d-1.12_20090930";
|
2010-03-02 00:31:35 +01:00
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = https://www.sci.utah.edu/releases/seg3d_v1.12/Seg3D_1.12_20090930_source.tgz;
|
2010-03-02 00:31:35 +01:00
|
|
|
sha256 = "1wr6rc6v5qjjkmws8yrc03z35h3iydxk1z28p06v1wdnca0y71z8";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./cstdio.patch ];
|
|
|
|
|
2010-03-04 15:44:43 +01:00
|
|
|
cmakeFlags = [
|
2015-04-26 19:54:51 +02:00
|
|
|
"-DM_LIBRARY=${stdenv.glibc.out}/lib/libm.so"
|
|
|
|
"-DDL_LIBRARY=${stdenv.glibc.out}/lib/libdl.so"
|
2010-03-04 15:44:43 +01:00
|
|
|
"-DBUILD_UTILS=1"
|
|
|
|
"-DBUILD_SEG3D=1"
|
|
|
|
"-DBUILD_DATAFLOW=0"
|
|
|
|
"-DBUILD_SHARED_LIBS=0"
|
|
|
|
"-DWITH_X11=1"
|
|
|
|
"-DBUILD_BIOMESH3D=1"
|
|
|
|
"-DWITH_TETGEN=1"
|
|
|
|
"-DBUILD_TYPE=Release"
|
|
|
|
"-DWITH_WXWIDGETS=ON"
|
|
|
|
"-DITK_DIR=${itk}/lib/InsightToolkit"
|
|
|
|
"-DGDCM_LIBRARY=${itk}/lib/libitkgdcm.a"
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
makeFlags = "VERBOSE=1";
|
2010-03-02 00:31:35 +01:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export LD_LIBRARY_PATH=`pwd`/lib
|
2010-03-04 15:44:43 +01:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lGLU -lSM -lICE -lX11 -lXext -luuid";
|
2010-03-02 00:31:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preUnpack = ''
|
|
|
|
set -x
|
|
|
|
sourceRoot=`pwd`/src
|
|
|
|
'';
|
|
|
|
|
2010-03-04 15:44:43 +01:00
|
|
|
postInstall = ''
|
|
|
|
cp Seg3D $out/bin
|
|
|
|
exit 1
|
|
|
|
'';
|
|
|
|
|
2018-02-24 14:12:44 +01:00
|
|
|
buildInputs = [ cmake wxGTK itk libGLU_combined libXft libXext libXi zlib libXmu libuuid ];
|
2017-03-10 01:05:04 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
broken = true;
|
|
|
|
};
|
2010-03-02 00:31:35 +01:00
|
|
|
}
|