at 18.03-beta 49 lines 1.2 kB view raw
1{ stdenv, fetchFromGitHub, unzip, openexr, boost, jemalloc, c-blosc, ilmbase, tbb }: 2 3stdenv.mkDerivation rec 4{ 5 name = "openvdb-${version}"; 6 version = "5.0.0"; 7 8 src = fetchFromGitHub { 9 owner = "dreamworksanimation"; 10 repo = "openvdb"; 11 rev = "v${version}"; 12 sha256 = "162l1prgdyf571bgxc621gicl40b050ny64f0jmnhz0h5xq6sfrv"; 13 }; 14 15 outputs = [ "out" ]; 16 17 buildInputs = [ unzip openexr boost tbb jemalloc c-blosc ilmbase ]; 18 19 setSourceRoot = '' 20 sourceRoot=$(echo */openvdb) 21 ''; 22 23 installTargets = "install_lib"; 24 25 enableParallelBuilding = true; 26 27 buildFlags = ''lib 28 DESTDIR=$(out) 29 HALF_LIB=-lHalf 30 TBB_LIB=-ltbb 31 BLOSC_LIB=-lblosc 32 LOG4CPLUS_LIB= 33 BLOSC_INCLUDE_DIR=${c-blosc}/include/ 34 BLOSC_LIB_DIR=${c-blosc}/lib/ 35 ''; 36 37 installFlags = ''DESTDIR=$(out)''; 38 39 NIX_CFLAGS_COMPILE="-I${openexr.dev}/include/OpenEXR -I${ilmbase.dev}/include/OpenEXR/"; 40 NIX_LDFLAGS="-lboost_iostreams"; 41 42 meta = with stdenv.lib; { 43 description = "An open framework for voxel"; 44 homepage = "http://www.openvdb.org"; 45 maintainers = [ maintainers.guibou ]; 46 platforms = platforms.all; 47 license = licenses.mpl20; 48 }; 49}