2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, boost
|
|
|
|
, cmake
|
2021-06-04 09:07:49 +00:00
|
|
|
, giflib
|
2020-04-24 23:36:52 +00:00
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
2023-01-11 07:51:40 +00:00
|
|
|
, opencolorio
|
2020-04-24 23:36:52 +00:00
|
|
|
, openexr
|
|
|
|
, robin-map
|
|
|
|
, unzip
|
2021-03-23 19:22:30 +00:00
|
|
|
, fmt
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openimageio";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.5.15.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-09-19 14:19:46 +00:00
|
|
|
owner = "AcademySoftwareFoundation";
|
|
|
|
repo = "OpenImageIO";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-jtX6IDR/yFn10hf+FxM0s4St9XYxhQ1UlMAsNzOxuio=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Workaround broken zlib version detecion in CMake < 3.37.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./src/cmake/Config.cmake.in \
|
|
|
|
--replace " @ZLIB_VERSION@" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
unzip
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
2021-06-04 09:07:49 +00:00
|
|
|
giflib
|
2020-04-24 23:36:52 +00:00
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libtiff
|
2023-01-11 07:51:40 +00:00
|
|
|
opencolorio
|
2020-04-24 23:36:52 +00:00
|
|
|
openexr
|
|
|
|
robin-map
|
2023-04-29 16:46:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-03-23 19:22:30 +00:00
|
|
|
fmt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_PYTHON=OFF"
|
|
|
|
"-DUSE_QT=OFF"
|
|
|
|
# GNUInstallDirs
|
2021-02-05 17:12:51 +00:00
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib" # needs relative path for pkg-config
|
2023-04-29 16:46:19 +00:00
|
|
|
# Do not install a copy of fmt header files
|
|
|
|
"-DINTERNALIZE_FMT=OFF"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $dev/lib/cmake/OpenImageIO/OpenImageIOTargets-*.cmake \
|
|
|
|
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$out/lib/lib"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
homepage = "https://openimageio.org";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library and tools for reading and writing images";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|