2017-09-17 20:42:14 +00:00
|
|
|
{ stdenv, fetchFromGitHub, unzip, openexr, boost, jemalloc, c-blosc, ilmbase, tbb }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec
|
|
|
|
{
|
|
|
|
name = "openvdb-${version}";
|
2018-04-12 11:07:06 +00:00
|
|
|
version = "5.1.0";
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dreamworksanimation";
|
|
|
|
repo = "openvdb";
|
|
|
|
rev = "v${version}";
|
2018-04-12 11:07:06 +00:00
|
|
|
sha256 = "1als53dnbnwa66k16vy95h1rhpdzz6i80c0gc2g3i17qbasl6ni5";
|
2017-09-17 20:42:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
buildInputs = [ unzip openexr boost tbb jemalloc c-blosc ilmbase ];
|
|
|
|
|
2017-11-02 12:54:20 +00:00
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */openvdb)
|
|
|
|
'';
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
installTargets = "install_lib";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
buildFlags = ''lib
|
|
|
|
DESTDIR=$(out)
|
|
|
|
HALF_LIB=-lHalf
|
|
|
|
TBB_LIB=-ltbb
|
|
|
|
BLOSC_LIB=-lblosc
|
|
|
|
LOG4CPLUS_LIB=
|
|
|
|
BLOSC_INCLUDE_DIR=${c-blosc}/include/
|
|
|
|
BLOSC_LIB_DIR=${c-blosc}/lib/
|
2018-03-23 23:16:15 +00:00
|
|
|
'';
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
installFlags = ''DESTDIR=$(out)'';
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="-I${openexr.dev}/include/OpenEXR -I${ilmbase.dev}/include/OpenEXR/";
|
|
|
|
NIX_LDFLAGS="-lboost_iostreams";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An open framework for voxel";
|
|
|
|
homepage = "http://www.openvdb.org";
|
|
|
|
maintainers = [ maintainers.guibou ];
|
2018-03-23 23:16:15 +00:00
|
|
|
platforms = platforms.linux;
|
2017-09-17 20:42:14 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
};
|
|
|
|
}
|