diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/compilers/osl/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/compilers/osl/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/osl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/osl/default.nix new file mode 100644 index 000000000000..2c00420c3626 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/osl/default.nix @@ -0,0 +1,39 @@ +{ clangStdenv, stdenv, fetchFromGitHub, cmake, zlib, openexr, +openimageio, llvm, boost165, flex, bison, partio, pugixml, +util-linux, python +}: + +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}"; + version = "1.10.9"; + + src = fetchFromGitHub { + owner = "imageworks"; + repo = "OpenShadingLanguage"; + rev = "Release-1.10.9"; + sha256 = "1dwf10f2fpxc55pymwkapql20nc462mq61hv21c527994c2qp1ll"; + }; + + cmakeFlags = [ "-DUSE_BOOST_WAVE=ON" "-DENABLERTTI=ON" ]; + enableParallelBuilding = true; + + preConfigure = '' patchShebangs src/liboslexec/serialize-bc.bash ''; + + buildInputs = [ + cmake zlib openexr openimageio llvm + boost_static flex bison partio pugixml + util-linux # needed just for hexdump + python # CMake doesn't check this? + ]; + # TODO: How important is partio? CMake doesn't seem to find it + meta = with stdenv.lib; { + description = "Advanced shading language for production GI renderers"; + homepage = "http://opensource.imageworks.com/?p=osl"; + maintainers = with maintainers; [ hodapp ]; + license = licenses.bsd3; + platforms = platforms.linux; + }; +} |