2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, unzip, openexr, boost, jemalloc, c-blosc, ilmbase, tbb }:
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec
|
|
|
|
{
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "openvdb";
|
2020-04-15 05:29:17 +00:00
|
|
|
version = "7.0.0";
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dreamworksanimation";
|
|
|
|
repo = "openvdb";
|
|
|
|
rev = "v${version}";
|
2020-04-15 05:29:17 +00:00
|
|
|
sha256 = "0hhs50f05hkgj1wni53cwbsx2bhn1aam6z65j133356gbid2carl";
|
2017-09-17 20:42:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
buildInputs = [ openexr boost tbb jemalloc c-blosc ilmbase ];
|
2017-09-17 20:42:14 +00:00
|
|
|
|
2017-11-02 12:54:20 +00:00
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */openvdb)
|
|
|
|
'';
|
2017-09-17 20:42:14 +00:00
|
|
|
|
2019-10-29 22:21:22 +00:00
|
|
|
installTargets = [ "install_lib" ];
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-10-29 22:21:22 +00:00
|
|
|
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/"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
2017-09-17 20:42:14 +00:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="-I${openexr.dev}/include/OpenEXR -I${ilmbase.dev}/include/OpenEXR/";
|
|
|
|
NIX_LDFLAGS="-lboost_iostreams";
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-09-17 20:42:14 +00:00
|
|
|
description = "An open framework for voxel";
|
2019-04-22 08:14:28 +00:00
|
|
|
homepage = "https://www.openvdb.org";
|
2017-09-17 20:42:14 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|