2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-01-26 04:04:25 +00:00
|
|
|
, fetchpatch
|
2021-08-22 07:53:02 +00:00
|
|
|
, zlib
|
|
|
|
, cmake
|
|
|
|
, imath
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openexr";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "3.1.7";
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AcademySoftwareFoundation";
|
|
|
|
repo = "openexr";
|
|
|
|
rev = "v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "sha256-Kl+aOA797aZvrvW4ZQNHdSU7YFPieZEzX3aYeaoH6eU=";
|
2021-08-22 07:53:02 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
# tests are determined to use /var/tmp on unix
|
|
|
|
postPatch = ''
|
|
|
|
cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do
|
|
|
|
substituteInPlace $f --replace '/var/tmp' "$TMPDIR"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
propagatedBuildInputs = [ imath zlib ];
|
2021-08-22 07:53:02 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A high dynamic-range (HDR) image file format";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://www.openexr.com";
|
2021-08-22 07:53:02 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ paperdigits ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|