From 7e83a040fa2843e36b201c6d79ad118e9192b1a0 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Sat, 19 Jun 2021 22:11:00 -0500 Subject: [PATCH 1/8] maintainers: Add rytone --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8e18d02698e9..3d3a992cf4e9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9068,6 +9068,16 @@ githubId = 3280280; name = "Ryne Everett"; }; + rytone = { + email = "max@ryt.one"; + github = "rytone"; + githubId = 8082305; + name = "Maxwell Beck"; + keys = [{ + longkeyid = "rsa2048/0xBB3EFA303760A0DB"; + fingerprint = "D260 79E3 C2BC 2E43 905B D057 BB3E FA30 3760 A0DB"; + }]; + }; rzetterberg = { email = "richard.zetterberg@gmail.com"; github = "rzetterberg"; From 6d45afda00257f0ae75f31a2b597181247190af0 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Sat, 19 Jun 2021 22:14:25 -0500 Subject: [PATCH 2/8] pystring: init at 1.1.3 Required for OpenColorIO 2.x --- .../libraries/pystring/default.nix | 30 +++++++++++++++++++ .../libraries/pystring/makefile.patch | 26 ++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 58 insertions(+) create mode 100644 pkgs/development/libraries/pystring/default.nix create mode 100644 pkgs/development/libraries/pystring/makefile.patch diff --git a/pkgs/development/libraries/pystring/default.nix b/pkgs/development/libraries/pystring/default.nix new file mode 100644 index 000000000000..df80bb773e30 --- /dev/null +++ b/pkgs/development/libraries/pystring/default.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchFromGitHub, libtool }: + +stdenv.mkDerivation rec { + pname = "pystring"; + version = "1.1.3"; + + src = fetchFromGitHub { + owner = "imageworks"; + repo = "pystring"; + rev = "v${version}"; + sha256 = "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf"; + }; + + nativeBuildInputs = [ libtool ]; + + patches = [ ./makefile.patch ]; + + doCheck = true; + checkTarget = "test"; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + homepage = "https://github.com/imageworks/pystring/"; + description = "A collection of C++ functions which match the interface and behavior of python's string class methods using std::string"; + license = licenses.bsd3; + maintainers = [ maintainers.rytone ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/libraries/pystring/makefile.patch b/pkgs/development/libraries/pystring/makefile.patch new file mode 100644 index 000000000000..0bbd6522d39d --- /dev/null +++ b/pkgs/development/libraries/pystring/makefile.patch @@ -0,0 +1,26 @@ +--- pystring/Makefile.orig 2020-02-04 03:24:44.000000000 -0300 ++++ pystring/Makefile 2020-11-20 20:23:07.314247959 -0300 +@@ -1,7 +1,9 @@ +-LIBTOOL = libtool +-LIBDIR = /usr/lib +-CXX = g++ +-CXXFLAGS = -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 ++LIBTOOL ?= libtool ++PREFIX ?= /usr ++INCLUDEDIR = ${PREFIX}/include/pystring ++LIBDIR = ${PREFIX}/lib ++CXX ?= g++ ++CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -fPIC + + all: libpystring.la + +@@ -12,7 +14,8 @@ + $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR) + + install: libpystring.la +- $(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$< ++ $(LIBTOOL) --mode=install install -Dm755 $< $(DESTDIR)$(LIBDIR)/$< ++ $(LIBTOOL) --mode=install install -Dm644 pystring.h $(DESTDIR)$(INCLUDEDIR)/pystring.h + + clean: + $(RM) -fr pystring.lo pystring.o libpystring.la .libs diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 40be91d9a71a..bc4ce175c9aa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8085,6 +8085,8 @@ in pywal = with python3Packages; toPythonApplication pywal; + pystring = callPackage ../development/libraries/pystring {}; + rbw = callPackage ../tools/security/rbw { inherit (darwin.apple_sdk.frameworks) Security; }; From 26d63b55d071bfcb40e2572e02a221a3efbe3650 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Sat, 19 Jun 2021 22:15:07 -0500 Subject: [PATCH 3/8] opencolorio2: init at 2.0.1 --- .../development/libraries/opencolorio/1.x.nix | 47 +++++++++++++++++++ .../libraries/opencolorio/default.nix | 35 ++++---------- pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 58 insertions(+), 28 deletions(-) create mode 100644 pkgs/development/libraries/opencolorio/1.x.nix diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix new file mode 100644 index 000000000000..8908f4866156 --- /dev/null +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -0,0 +1,47 @@ +{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }: + +with lib; + +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 ] ++ 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" + ] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON" + ++ 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/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index 8908f4866156..d9de24b7fa04 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -1,47 +1,28 @@ -{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }: +{ stdenv, lib, fetchFromGitHub, cmake, expat, libyamlcpp, ilmbase, pystring, lcms2, python3Packages }: 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" ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ expat libyamlcpp ilmbase pystring lcms2 python3Packages.pybind11 ]; - # 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" "" - ''; - - 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"; - - postInstall = '' - mkdir -p $bin/bin; mv $out/bin $bin/ - ''; + cmakeFlags = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" ]; 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc4ce175c9aa..42306cf5b27b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17513,7 +17513,9 @@ in openldap = callPackage ../development/libraries/openldap { }; - opencolorio = callPackage ../development/libraries/opencolorio { }; + opencolorio1 = callPackage ../development/libraries/opencolorio/1.x.nix { }; + opencolorio2 = callPackage ../development/libraries/opencolorio { }; + opencolorio = opencolorio1; opendmarc = callPackage ../development/libraries/opendmarc { }; From 0e07b4ec9eef38d97196256c74e037742bb920bb Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Sat, 19 Jun 2021 22:15:45 -0500 Subject: [PATCH 4/8] blender: Switch to opencolorio2 --- pkgs/applications/misc/blender/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 305ab8917130..f2265346a39e 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,7 +1,7 @@ { config, stdenv, lib, fetchurl, fetchzip, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio2, openjpeg, python39Packages +, libtiff, libGLU, libGL, openal, opencolorio2, openexr, openimagedenoise, openimageio2, openjpeg, python39Packages , openvdb, libXxf86vm, tbb, alembic , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost ffmpeg gettext glew ilmbase freetype libjpeg libpng libsamplerate libsndfile libtiff - opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc + opencolorio2 openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc alembic (opensubdiv.override { inherit cudaSupport; }) tbb From 455689301962fc8a02c298ba67a4e56a102c1948 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Wed, 23 Jun 2021 19:12:38 -0500 Subject: [PATCH 5/8] pystring: Use CMake build Has a pull request open on the upstream repo, thus may be upstreamed in the future as opposed to the previous makefile patch. --- .../libraries/pystring/default.nix | 15 ++++++----- .../libraries/pystring/makefile.patch | 26 ------------------- 2 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 pkgs/development/libraries/pystring/makefile.patch diff --git a/pkgs/development/libraries/pystring/default.nix b/pkgs/development/libraries/pystring/default.nix index df80bb773e30..3a1e64c0b000 100644 --- a/pkgs/development/libraries/pystring/default.nix +++ b/pkgs/development/libraries/pystring/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, libtool }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake }: stdenv.mkDerivation rec { pname = "pystring"; @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { sha256 = "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf"; }; - nativeBuildInputs = [ libtool ]; + patches = [ + (fetchpatch { + name = "pystring-cmake-configuration.patch"; + url = "https://github.com/imageworks/pystring/commit/4f653fc35421129eae8a2c424901ca7170059370.patch"; + sha256 = "1hynzz76ff4vvmi6kwixsmjswkpyj6s4vv05d7nw0zscj4cdp8k3"; + }) + ]; - patches = [ ./makefile.patch ]; + nativeBuildInputs = [ cmake ]; doCheck = true; - checkTarget = "test"; - - makeFlags = [ "PREFIX=$(out)" ]; meta = with lib; { homepage = "https://github.com/imageworks/pystring/"; diff --git a/pkgs/development/libraries/pystring/makefile.patch b/pkgs/development/libraries/pystring/makefile.patch deleted file mode 100644 index 0bbd6522d39d..000000000000 --- a/pkgs/development/libraries/pystring/makefile.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- pystring/Makefile.orig 2020-02-04 03:24:44.000000000 -0300 -+++ pystring/Makefile 2020-11-20 20:23:07.314247959 -0300 -@@ -1,7 +1,9 @@ --LIBTOOL = libtool --LIBDIR = /usr/lib --CXX = g++ --CXXFLAGS = -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -+LIBTOOL ?= libtool -+PREFIX ?= /usr -+INCLUDEDIR = ${PREFIX}/include/pystring -+LIBDIR = ${PREFIX}/lib -+CXX ?= g++ -+CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -fPIC - - all: libpystring.la - -@@ -12,7 +14,8 @@ - $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR) - - install: libpystring.la -- $(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$< -+ $(LIBTOOL) --mode=install install -Dm755 $< $(DESTDIR)$(LIBDIR)/$< -+ $(LIBTOOL) --mode=install install -Dm644 pystring.h $(DESTDIR)$(INCLUDEDIR)/pystring.h - - clean: - $(RM) -fr pystring.lo pystring.o libpystring.la .libs From 4d367a278361dcc9e09c473ac3b141ed58ac05cb Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Wed, 23 Jun 2021 19:14:12 -0500 Subject: [PATCH 6/8] opencolorio2: Refactor dependencies Python bindings and utility applications can now be disabled if desired. GPU rendering is always enabled. --- .../libraries/opencolorio/default.nix | 27 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index d9de24b7fa04..522c8cfa4a13 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -1,4 +1,16 @@ -{ stdenv, lib, fetchFromGitHub, cmake, expat, libyamlcpp, ilmbase, pystring, lcms2, python3Packages }: +{ + 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; @@ -14,9 +26,18 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ expat libyamlcpp ilmbase pystring lcms2 python3Packages.pybind11 ]; + 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 = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" ]; + 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 42306cf5b27b..2877c8da84d2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17514,7 +17514,9 @@ in openldap = callPackage ../development/libraries/openldap { }; opencolorio1 = callPackage ../development/libraries/opencolorio/1.x.nix { }; - opencolorio2 = callPackage ../development/libraries/opencolorio { }; + opencolorio2 = callPackage ../development/libraries/opencolorio { + inherit (darwin.apple_sdk.frameworks) Carbon GLUT Cocoa; + }; opencolorio = opencolorio1; opendmarc = callPackage ../development/libraries/opendmarc { }; From de8a4f1741bbe8c5183219d9730a8798b183d29f Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Wed, 23 Jun 2021 19:33:50 -0500 Subject: [PATCH 7/8] opencolorio: Replace with 2.x All applications besides Blender have been pinned to 1.x --- pkgs/applications/graphics/krita/default.nix | 4 ++-- pkgs/applications/graphics/openimageio/2.x.nix | 4 ++-- pkgs/applications/graphics/openimageio/default.nix | 4 ++-- pkgs/applications/misc/blender/default.nix | 4 ++-- pkgs/applications/video/natron/default.nix | 6 +++--- pkgs/applications/video/olive-editor/default.nix | 4 ++-- pkgs/tools/graphics/appleseed/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 5 ++--- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/graphics/krita/default.nix b/pkgs/applications/graphics/krita/default.nix index fc6c1d55e706..1a83fe9931ff 100644 --- a/pkgs/applications/graphics/krita/default.nix +++ b/pkgs/applications/graphics/krita/default.nix @@ -3,7 +3,7 @@ , kguiaddons, ki18n, kitemmodels, kitemviews, kwindowsystem , kio, kcrash, breeze-icons , boost, libraw, fftw, eigen, exiv2, libheif, lcms2, gsl, openexr, giflib -, openjpeg, opencolorio, vc, poppler, curl, ilmbase +, openjpeg, opencolorio_1, vc, poppler, curl, ilmbase , qtmultimedia, qtx11extras, quazip , python3Packages }: @@ -23,7 +23,7 @@ mkDerivation rec { karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons ki18n kitemmodels kitemviews kwindowsystem kio kcrash breeze-icons boost libraw fftw eigen exiv2 lcms2 gsl openexr libheif giflib - openjpeg opencolorio poppler curl ilmbase + openjpeg opencolorio_1 poppler curl ilmbase qtmultimedia qtx11extras quazip python3Packages.pyqt5 ] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc; diff --git a/pkgs/applications/graphics/openimageio/2.x.nix b/pkgs/applications/graphics/openimageio/2.x.nix index 771af5133561..8c9639e3fd52 100644 --- a/pkgs/applications/graphics/openimageio/2.x.nix +++ b/pkgs/applications/graphics/openimageio/2.x.nix @@ -7,7 +7,7 @@ , libjpeg , libpng , libtiff -, opencolorio +, opencolorio_1 , openexr , robin-map , unzip @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { libjpeg libpng libtiff - opencolorio + opencolorio_1 openexr robin-map fmt diff --git a/pkgs/applications/graphics/openimageio/default.nix b/pkgs/applications/graphics/openimageio/default.nix index 2461fcc27657..e5262ab98d0a 100644 --- a/pkgs/applications/graphics/openimageio/default.nix +++ b/pkgs/applications/graphics/openimageio/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, boost, cmake, ilmbase, libjpeg, libpng, libtiff -, opencolorio, openexr, unzip +, opencolorio_1, openexr, unzip }: stdenv.mkDerivation rec { @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake unzip ]; buildInputs = [ boost ilmbase libjpeg libpng - libtiff opencolorio openexr + libtiff opencolorio_1 openexr ]; cmakeFlags = [ diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index f2265346a39e..305ab8917130 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,7 +1,7 @@ { config, stdenv, lib, fetchurl, fetchzip, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU, libGL, openal, opencolorio2, openexr, openimagedenoise, openimageio2, openjpeg, python39Packages +, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio2, openjpeg, python39Packages , openvdb, libXxf86vm, tbb, alembic , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost ffmpeg gettext glew ilmbase freetype libjpeg libpng libsamplerate libsndfile libtiff - opencolorio2 openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc + opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc alembic (opensubdiv.override { inherit cudaSupport; }) tbb diff --git a/pkgs/applications/video/natron/default.nix b/pkgs/applications/video/natron/default.nix index bbbcf3d76876..ea8a801d1954 100644 --- a/pkgs/applications/video/natron/default.nix +++ b/pkgs/applications/video/natron/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, qt4, pkg-config, boost, expat, cairo, python2Packages, cmake, flex, bison, pango, librsvg, librevenge, libxml2, libcdr, libzip, - poppler, imagemagick, openexr, ffmpeg_3, opencolorio, openimageio, + poppler, imagemagick, openexr, ffmpeg_3, opencolorio_1, openimageio, qmake4Hook, libpng, libGL, lndir, libraw, openjpeg, libwebp, fetchFromGitHub }: let @@ -58,7 +58,7 @@ let sha256 = "tUb6myG03mRieUAfgRZfv5Ap+cLvbpNrLMYCGTiAq8c="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ - pango librsvg librevenge libcdr opencolorio libxml2 libzip + pango librsvg librevenge libcdr opencolorio_1 libxml2 libzip poppler imagemagick ]; preConfigure = '' @@ -74,7 +74,7 @@ let sha256 = "OQg6a5wNy9TFFySjmgd1subvXRxY/ZnSOCkaoUo+ZaA="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ - libpng ffmpeg_3 openexr opencolorio openimageio boost libGL + libpng ffmpeg_3 openexr opencolorio_1 openimageio boost libGL seexpr libraw openjpeg libwebp ]; }) diff --git a/pkgs/applications/video/olive-editor/default.nix b/pkgs/applications/video/olive-editor/default.nix index 7bacf4138c12..c63011eebc00 100644 --- a/pkgs/applications/video/olive-editor/default.nix +++ b/pkgs/applications/video/olive-editor/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, pkg-config, which, qmake, mkDerivation, - qtmultimedia, wrapQtAppsHook, frei0r, opencolorio, ffmpeg-full, + qtmultimedia, wrapQtAppsHook, frei0r, opencolorio_1, ffmpeg-full, CoreFoundation }: mkDerivation rec { @@ -23,7 +23,7 @@ mkDerivation rec { buildInputs = [ ffmpeg-full frei0r - opencolorio + opencolorio_1 qtmultimedia ] ++ lib.optional stdenv.isDarwin CoreFoundation; diff --git a/pkgs/tools/graphics/appleseed/default.nix b/pkgs/tools/graphics/appleseed/default.nix index a0d659efb3e8..1436aacad099 100644 --- a/pkgs/tools/graphics/appleseed/default.nix +++ b/pkgs/tools/graphics/appleseed/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile, eigen, libpng, python, libGLU, qt4, openexr, openimageio, -opencolorio, xercesc, ilmbase, osl, seexpr, makeWrapper +opencolorio_1, xercesc, ilmbase, osl, seexpr, makeWrapper }: let boost_static = boost165.override { @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config makeWrapper ]; buildInputs = [ boost_static guile eigen libpng python - libGLU qt4 openexr openimageio opencolorio xercesc + libGLU qt4 openexr openimageio opencolorio_1 xercesc osl seexpr ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2877c8da84d2..8afcefce8677 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17513,11 +17513,10 @@ in openldap = callPackage ../development/libraries/openldap { }; - opencolorio1 = callPackage ../development/libraries/opencolorio/1.x.nix { }; - opencolorio2 = callPackage ../development/libraries/opencolorio { + opencolorio = callPackage ../development/libraries/opencolorio { inherit (darwin.apple_sdk.frameworks) Carbon GLUT Cocoa; }; - opencolorio = opencolorio1; + opencolorio_1 = callPackage ../development/libraries/opencolorio/1.x.nix { }; opendmarc = callPackage ../development/libraries/opendmarc { }; From a1d1b7e2849b926ec2affdfad4814393a74b6f54 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Wed, 23 Jun 2021 19:40:13 -0500 Subject: [PATCH 8/8] opencolorio_1: Remove top-level `with lib` --- pkgs/development/libraries/opencolorio/1.x.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix index 8908f4866156..041ddf8e8371 100644 --- a/pkgs/development/libraries/opencolorio/1.x.nix +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -1,7 +1,5 @@ { stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }: -with lib; - stdenv.mkDerivation rec { pname = "opencolorio"; version = "1.1.1"; @@ -18,7 +16,7 @@ stdenv.mkDerivation rec { # 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; + buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost; postPatch = '' substituteInPlace src/core/CMakeLists.txt --replace "-Werror" "" @@ -30,8 +28,8 @@ stdenv.mkDerivation rec { "-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"; + ] ++ 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/