aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/openvdb
diff options
context:
space:
mode:
authorGuillaume Bouchard <guillaum.bouchard@gmail.com>2017-09-17 22:42:14 +0200
committerGuillaume Bouchard <guillaum.bouchard@gmail.com>2017-10-18 11:57:10 +0200
commit41b06c1519533a51e356c6d53b0005ba21c1c901 (patch)
treeb457157b85fbf32fa87f3d9ea7d8002df33c4e8f /pkgs/development/libraries/openvdb
parentafc6a8a25944e5d980cdf41a6b7a22760ab2595e (diff)
openvdb: init at 4.0.2
Diffstat (limited to 'pkgs/development/libraries/openvdb')
-rw-r--r--pkgs/development/libraries/openvdb/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/libraries/openvdb/default.nix b/pkgs/development/libraries/openvdb/default.nix
new file mode 100644
index 000000000000..b172b82a295c
--- /dev/null
+++ b/pkgs/development/libraries/openvdb/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, unzip, openexr, boost, jemalloc, c-blosc, ilmbase, tbb }:
+
+stdenv.mkDerivation rec
+{
+ name = "openvdb-${version}";
+ version = "4.0.2";
+
+ src = fetchFromGitHub {
+ owner = "dreamworksanimation";
+ repo = "openvdb";
+ rev = "v${version}";
+ sha256 = "0kqlsfa9rdpxpw7v61vfknvs11axh196ilqk6bnyyfkslmmcak45";
+ };
+
+ outputs = [ "out" ];
+
+ buildInputs = [ unzip openexr boost tbb jemalloc c-blosc ilmbase ];
+
+ sourceRoot = "openvdb-v${version}-src/openvdb";
+
+ 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/
+ '';
+
+ 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 ];
+ platforms = platforms.all;
+ license = licenses.mpl20;
+ };
+}