depot/third_party/nixpkgs/pkgs/development/libraries/embree/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, pkgconfig, ispc, tbb, glfw,
openimageio, libjpeg, libpng, libpthreadstubs, libX11 }:
stdenv.mkDerivation rec {
pname = "embree";
version = "3.11.0";
src = fetchFromGitHub {
owner = "embree";
repo = "embree";
rev = "v${version}";
sha256 = "0v5gqi8jp09xxcbyyknji83412bq4l0w35b6hnrqxycgdrnf7hkr";
};
postPatch = ''
# Fix duplicate /nix/store/.../nix/store/.../ paths
sed -i "s|SET(EMBREE_ROOT_DIR .*)|set(EMBREE_ROOT_DIR $out)|" \
common/cmake/embree-config.cmake
sed -i "s|$""{EMBREE_ROOT_DIR}/||" common/cmake/embree-config.cmake
'';
cmakeFlags = [
"-DEMBREE_TUTORIALS=OFF"
"-DEMBREE_RAY_MASK=ON"
];
nativeBuildInputs = [ ispc pkgconfig cmake ];
buildInputs = [ tbb glfw openimageio libjpeg libpng libX11 libpthreadstubs ];
meta = with stdenv.lib; {
description = "High performance ray tracing kernels from Intel";
homepage = "https://embree.github.io/";
maintainers = with maintainers; [ hodapp gebner ];
license = licenses.asl20;
platforms = platforms.unix;
};
}