about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/opencolorio
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
commit16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch)
tree0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/development/libraries/opencolorio
parente7caacc4c122b7641bb66a4c2595289347a4996c (diff)
parent3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff)
downloadnixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/opencolorio')
-rw-r--r--nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/opencolorio/default.nix54
2 files changed, 73 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix b/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix
new file mode 100644
index 000000000000..041ddf8e8371
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }:
+
+stdenv.mkDerivation rec {
+  pname = "opencolorio";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "imageworks";
+    repo = "OpenColorIO";
+    rev = "v${version}";
+    sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb";
+  };
+
+  outputs = [ "bin" "out" "dev" ];
+
+  # TODO: Investigate whether git can be dropped: It's only used to apply patches
+  nativeBuildInputs = [ cmake pkg-config git ];
+
+  buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost;
+
+  postPatch = ''
+    substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
+    substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
+  '';
+
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_LCMS=ON"
+    "-DUSE_EXTERNAL_TINYXML=ON"
+    # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
+    "-DUSE_EXTERNAL_YAML=OFF"
+  ] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
+    ++ lib.optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
+
+  postInstall = ''
+    mkdir -p $bin/bin; mv $out/bin $bin/
+  '';
+
+  meta = with lib; {
+    homepage = "https://opencolorio.org";
+    description = "A color management framework for visual effects and animation";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencolorio/default.nix b/nixpkgs/pkgs/development/libraries/opencolorio/default.nix
index 8908f4866156..522c8cfa4a13 100644
--- a/nixpkgs/pkgs/development/libraries/opencolorio/default.nix
+++ b/nixpkgs/pkgs/development/libraries/opencolorio/default.nix
@@ -1,47 +1,49 @@
-{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }:
+{
+  stdenv, lib, fetchFromGitHub,
+  cmake, expat, libyamlcpp, ilmbase, pystring, # Base dependencies
+
+  glew, freeglut, # Only required on Linux
+  Carbon, GLUT, Cocoa, # Only required on Darwin
+
+  pythonBindings ? true, # Python bindings
+  python3Packages,
+
+  buildApps ? true, # Utility applications
+  lcms2, openimageio2, openexr,
+}:
 
 with lib;
 
 stdenv.mkDerivation rec {
   pname = "opencolorio";
-  version = "1.1.1";
+  version = "2.0.1";
 
   src = fetchFromGitHub {
-    owner = "imageworks";
+    owner = "AcademySoftwareFoundation";
     repo = "OpenColorIO";
     rev = "v${version}";
-    sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb";
+    sha256 = "194j9jp5c8ws0fryiz936wyinphnpzwpqnzvw9ryx6rbiwrba487";
   };
 
-  outputs = [ "bin" "out" "dev" ];
-
-  # TODO: Investigate whether git can be dropped: It's only used to apply patches
-  nativeBuildInputs = [ cmake pkg-config git ];
-
-  buildInputs = [ lcms2 tinyxml ] ++ optional stdenv.isDarwin boost;
-
-  postPatch = ''
-    substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
-    substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
-  '';
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ expat libyamlcpp ilmbase pystring ]
+    ++ 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 = [
-    "-DUSE_EXTERNAL_LCMS=ON"
-    "-DUSE_EXTERNAL_TINYXML=ON"
-    # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
-    "-DUSE_EXTERNAL_YAML=OFF"
-  ] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
-    ++ optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
+    cmakeFlags = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" ]
+    ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
+    ++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
 
-  postInstall = ''
-    mkdir -p $bin/bin; mv $out/bin $bin/
-  '';
+  # 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.goibhniu ];
+    maintainers = [ maintainers.rytone ];
     platforms = platforms.unix;
   };
 }