1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{ stdenv
, lib
, fetchFromGitHub
, cmake
, expat
, libyamlcpp
, ilmbase
, pystring
, imath
# Only required on Linux
, glew
, freeglut
# Only required on Darwin
, Carbon
, GLUT
, Cocoa
# Python bindings
, pythonBindings ? true # Python bindings
, python3Packages
# Build apps
, buildApps ? true # Utility applications
, lcms2
, openimageio2
, openexr
}:
stdenv.mkDerivation rec {
pname = "opencolorio";
version = "2.1.2";
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "OpenColorIO";
rev = "v${version}";
sha256 = "sha256-e1PpWjjfSjtgN9Rs/+lsA45Z9S4y4T6nqrJ02DZ4vjs=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
expat
libyamlcpp
ilmbase
pystring
imath
] ++ lib.optionals stdenv.hostPlatform.isLinux [ glew freeglut ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon GLUT Cocoa ]
++ lib.optionals pythonBindings [ python3Packages.python python3Packages.pybind11 ]
++ lib.optionals buildApps [ lcms2 openimageio2 openexr ];
cmakeFlags = [
"-DOCIO_INSTALL_EXT_PACKAGES=NONE"
] ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
# TODO Investigate this: Python and GPU tests fail to load libOpenColorIO.so.2.0
# doCheck = true;
meta = with lib; {
homepage = "https://opencolorio.org";
description = "A color management framework for visual effects and animation";
license = licenses.bsd3;
maintainers = [ maintainers.rytone ];
platforms = platforms.unix;
};
}
|