2021-01-22 11:25:31 +00:00
|
|
|
{ clangStdenv, lib, stdenv, fetchFromGitHub, cmake, zlib, openexr,
|
2018-06-20 19:42:10 +01:00
|
|
|
openimageio, llvm, boost165, flex, bison, partio, pugixml,
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux, python
|
2018-06-20 19:42:10 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let boost_static = boost165.override { enableStatic = true; };
|
|
|
|
in clangStdenv.mkDerivation rec {
|
|
|
|
# In theory this could use GCC + Clang rather than just Clang,
|
|
|
|
# but https://github.com/NixOS/nixpkgs/issues/29877 stops this
|
|
|
|
name = "openshadinglanguage-${version}";
|
2020-02-09 03:49:08 +00:00
|
|
|
version = "1.10.9";
|
2018-06-20 19:42:10 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "imageworks";
|
|
|
|
repo = "OpenShadingLanguage";
|
2020-02-09 03:49:08 +00:00
|
|
|
rev = "Release-1.10.9";
|
|
|
|
sha256 = "1dwf10f2fpxc55pymwkapql20nc462mq61hv21c527994c2qp1ll";
|
2018-06-20 19:42:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DUSE_BOOST_WAVE=ON" "-DENABLERTTI=ON" ];
|
|
|
|
|
|
|
|
preConfigure = '' patchShebangs src/liboslexec/serialize-bc.bash '';
|
2020-12-31 07:48:55 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake boost_static flex bison];
|
2018-06-20 19:42:10 +01:00
|
|
|
buildInputs = [
|
2020-12-31 07:48:55 +00:00
|
|
|
zlib openexr openimageio llvm
|
|
|
|
partio pugixml
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux # needed just for hexdump
|
2018-06-20 19:42:10 +01:00
|
|
|
python # CMake doesn't check this?
|
|
|
|
];
|
|
|
|
# TODO: How important is partio? CMake doesn't seem to find it
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2018-06-20 19:42:10 +01:00
|
|
|
description = "Advanced shading language for production GI renderers";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://opensource.imageworks.com/?p=osl";
|
2018-06-20 19:42:10 +01:00
|
|
|
maintainers = with maintainers; [ hodapp ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|