From 286a1ee6d83e70dd926a7a394865f3e332eb16d3 Mon Sep 17 00:00:00 2001 From: Indy Ray Date: Fri, 9 Feb 2024 12:00:29 -0800 Subject: [PATCH] djv: Adding OpenEXR Support Just adding openexr.dev as an input, and patching FindOpenEXR.cmake to find the correct directory. --- pkgs/applications/graphics/djv/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/djv/default.nix b/pkgs/applications/graphics/djv/default.nix index 735807691af7..17d789a9f20d 100644 --- a/pkgs/applications/graphics/djv/default.nix +++ b/pkgs/applications/graphics/djv/default.nix @@ -17,6 +17,7 @@ , libpng , opencolorio_1 , freetype +, openexr }: let @@ -145,11 +146,12 @@ stdenv.mkDerivation rec { ilmbase glm glfw3 - zlib.dev + zlib libpng freetype opencolorio_1 djv-deps + openexr ]; postPatch = '' @@ -162,6 +164,13 @@ stdenv.mkDerivation rec { sed -i cmake/Modules/FindOCIO.cmake \ -e 's/PATH_SUFFIXES static//' \ -e '/OpenColorIO_STATIC/d' + + # When searching for OpenEXR this looks for Iex.h, which exists in ilmbase, + # since it's a secondary inport, to find the correct OpenEXR lib, we search + # for something specifically in OpenEXR. + + sed -i cmake/Modules/FindOpenEXR.cmake \ + -e 's/find_path(OpenEXR_INCLUDE_DIR NAMES Iex.h PATH_SUFFIXES OpenEXR)/find_path(OpenEXR_INCLUDE_DIR NAMES ImfImage.h PATH_SUFFIXES OpenEXR)/' ''; # GLFW requires a working X11 session.