10 stdenv.mkDerivation rec {
14 outputs = [ "bin" "dev" "out" "doc" ];
16 src = fetchFromGitHub {
17 owner = "AcademySoftwareFoundation";
20 sha256 = "sha256-N7XdDaDsYdx4TXvHplQDTvhHNUmW5rntdaTKua4C0es=";
25 name = "CVE-2021-45942.patch";
26 url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
28 extraPrefix = "OpenEXR/IlmImf/";
29 sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy";
32 name = "CVE-2021-3933.patch";
33 url = "https://github.com/AcademySoftwareFoundation/openexr/commit/5db6f7aee79e3e75e8c3780b18b28699614dd08e.patch";
35 extraPrefix = "OpenEXR/IlmImf/";
36 sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ=";
39 # Backport gcc-13 fix:
40 # https://github.com/AcademySoftwareFoundation/openexr/pull/1264
45 # tests are determined to use /var/tmp on unix
46 find . -name tmpDir.h | while read -r f ; do
47 substituteInPlace $f --replace '/var/tmp' "$TMPDIR"
49 # On slower machines this test can take more than the default 1500 seconds
50 echo 'set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 3000)' >> OpenEXR/IlmImfTest/CMakeLists.txt
54 "-DCMAKE_CTEST_ARGUMENTS=--timeout;3600"
55 ] ++ lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
57 nativeBuildInputs = [ cmake ];
58 propagatedBuildInputs = [ ilmbase zlib ];
60 # https://github.com/AcademySoftwareFoundation/openexr/issues/1400
61 # https://github.com/AcademySoftwareFoundation/openexr/issues/1281
62 doCheck = !stdenv.isAarch32 && !stdenv.isi686;
65 description = "A high dynamic-range (HDR) image file format";
66 homepage = "https://www.openexr.com/";
67 license = licenses.bsd3;
68 platforms = platforms.all;