1 { stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb";
14 outputs = [ "bin" "out" "dev" ];
16 # TODO: Investigate whether git can be dropped: It's only used to apply patches
17 nativeBuildInputs = [ cmake pkg-config git ];
19 buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost;
22 substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
23 substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
27 "-DUSE_EXTERNAL_LCMS=ON"
28 "-DUSE_EXTERNAL_TINYXML=ON"
29 # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
30 "-DUSE_EXTERNAL_YAML=OFF"
31 ] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
32 ++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF"
33 ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-DCMAKE_OSX_ARCHITECTURES=arm64";
36 mkdir -p $bin/bin; mv $out/bin $bin/
40 homepage = "https://opencolorio.org";
41 description = "A color management framework for visual effects and animation";
42 license = licenses.bsd3;
43 maintainers = [ maintainers.goibhniu ];
44 platforms = platforms.unix;