Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchFromGitHub 3, boost 4, cmake 5, giflib 6, ilmbase 7, libjpeg 8, libpng 9, libtiff 10, opencolorio 11, openexr 12, robin-map 13, unzip 14, fmt 15}: 16 17stdenv.mkDerivation rec { 18 pname = "openimageio"; 19 version = "2.4.11.1"; 20 21 src = fetchFromGitHub { 22 owner = "OpenImageIO"; 23 repo = "oiio"; 24 rev = "v${version}"; 25 hash = "sha256-Q8Gb/zscZre7fJPyLlZn04Xp3VFFbr6Z007mDPzownc="; 26 }; 27 28 outputs = [ "bin" "out" "dev" "doc" ]; 29 30 nativeBuildInputs = [ 31 cmake 32 unzip 33 ]; 34 35 buildInputs = [ 36 boost 37 giflib 38 ilmbase 39 libjpeg 40 libpng 41 libtiff 42 opencolorio 43 openexr 44 robin-map 45 ]; 46 47 propagatedBuildInputs = [ 48 fmt 49 ]; 50 51 cmakeFlags = [ 52 "-DUSE_PYTHON=OFF" 53 "-DUSE_QT=OFF" 54 # GNUInstallDirs 55 "-DCMAKE_INSTALL_LIBDIR=lib" # needs relative path for pkg-config 56 # Do not install a copy of fmt header files 57 "-DINTERNALIZE_FMT=OFF" 58 ]; 59 60 postFixup = '' 61 substituteInPlace $dev/lib/cmake/OpenImageIO/OpenImageIOTargets-*.cmake \ 62 --replace "\''${_IMPORT_PREFIX}/lib/lib" "$out/lib/lib" 63 ''; 64 65 meta = with lib; { 66 homepage = "https://openimageio.org"; 67 description = "A library and tools for reading and writing images"; 68 license = licenses.bsd3; 69 maintainers = with maintainers; [ goibhniu ]; 70 platforms = platforms.unix; 71 }; 72}