94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
72 lines
1.3 KiB
Nix
72 lines
1.3 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, boost
|
|
, cmake
|
|
, giflib
|
|
, ilmbase
|
|
, libjpeg
|
|
, libpng
|
|
, libtiff
|
|
, opencolorio
|
|
, openexr
|
|
, robin-map
|
|
, unzip
|
|
, fmt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openimageio";
|
|
version = "2.4.11.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OpenImageIO";
|
|
repo = "oiio";
|
|
rev = "v${version}";
|
|
hash = "sha256-Q8Gb/zscZre7fJPyLlZn04Xp3VFFbr6Z007mDPzownc=";
|
|
};
|
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
unzip
|
|
];
|
|
|
|
buildInputs = [
|
|
boost
|
|
giflib
|
|
ilmbase
|
|
libjpeg
|
|
libpng
|
|
libtiff
|
|
opencolorio
|
|
openexr
|
|
robin-map
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
fmt
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_PYTHON=OFF"
|
|
"-DUSE_QT=OFF"
|
|
# GNUInstallDirs
|
|
"-DCMAKE_INSTALL_LIBDIR=lib" # needs relative path for pkg-config
|
|
# Do not install a copy of fmt header files
|
|
"-DINTERNALIZE_FMT=OFF"
|
|
];
|
|
|
|
postFixup = ''
|
|
substituteInPlace $dev/lib/cmake/OpenImageIO/OpenImageIOTargets-*.cmake \
|
|
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$out/lib/lib"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://openimageio.org";
|
|
description = "A library and tools for reading and writing images";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ goibhniu ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|