-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
61 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,62 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
zlib, | ||
ilmbase, | ||
fetchpatch, | ||
cmake, | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, imath | ||
, libdeflate | ||
, pkg-config | ||
, libjxl | ||
, pkgsCross | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "openexr"; | ||
version = "2.5.10"; | ||
|
||
outputs = [ | ||
"bin" | ||
"dev" | ||
"out" | ||
"doc" | ||
]; | ||
version = "3.2.4"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "AcademySoftwareFoundation"; | ||
repo = "openexr"; | ||
rev = "v${version}"; | ||
hash = "sha256-xdC+T79ZQBx/XhuIXtP93Roj0N9lF+E65ReEKQ4kIsg="; | ||
hash = "sha256-mVUxxYe6teiJ18PQ9703/kjBpJ9+a7vcDme+NwtQQQM="; | ||
}; | ||
|
||
patches = [ | ||
(fetchpatch { | ||
name = "CVE-2021-45942.patch"; | ||
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch"; | ||
stripLen = 4; | ||
extraPrefix = "OpenEXR/IlmImf/"; | ||
sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy"; | ||
}) | ||
(fetchpatch { | ||
name = "CVE-2021-3933.patch"; | ||
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/5db6f7aee79e3e75e8c3780b18b28699614dd08e.patch"; | ||
stripLen = 4; | ||
extraPrefix = "OpenEXR/IlmImf/"; | ||
sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ="; | ||
}) | ||
outputs = [ "bin" "dev" "out" "doc" ]; | ||
|
||
# GCC 13 fixes | ||
./gcc-13.patch | ||
]; | ||
patches = | ||
# Disable broken test on musl libc | ||
# https://github.com/AcademySoftwareFoundation/openexr/issues/1556 | ||
lib.optional stdenv.hostPlatform.isMusl ./disable-iex-test.patch | ||
; | ||
|
||
# tests are determined to use /var/tmp on unix | ||
postPatch = '' | ||
# tests are determined to use /var/tmp on unix | ||
find . -name tmpDir.h | while read -r f ; do | ||
cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do | ||
substituteInPlace $f --replace '/var/tmp' "$TMPDIR" | ||
done | ||
# On slower machines this test can take more than the default 1500 seconds | ||
echo 'set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 3000)' >> OpenEXR/IlmImfTest/CMakeLists.txt | ||
''; | ||
|
||
cmakeFlags = [ | ||
"-DCMAKE_CTEST_ARGUMENTS=--timeout;3600" | ||
] ++ lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON"; | ||
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON"; | ||
|
||
nativeBuildInputs = [ cmake pkg-config ]; | ||
propagatedBuildInputs = [ imath libdeflate ]; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
propagatedBuildInputs = [ | ||
ilmbase | ||
zlib | ||
]; | ||
# Without 'sse' enforcement tests fail on i686 as due to excessive precision as: | ||
# error reading back channel B pixel 21,-76 got -nan expected -nan | ||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"; | ||
|
||
# https://github.com/AcademySoftwareFoundation/openexr/issues/1400 | ||
# https://github.com/AcademySoftwareFoundation/openexr/issues/1281 | ||
doCheck = !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isi686; | ||
doCheck = !stdenv.hostPlatform.isAarch32; | ||
|
||
passthru.tests = { | ||
inherit libjxl; | ||
musl = pkgsCross.musl64.openexr; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "High dynamic-range (HDR) image file format"; | ||
homepage = "https://www.openexr.com/"; | ||
homepage = "https://www.openexr.com"; | ||
license = licenses.bsd3; | ||
maintainers = with maintainers; [ paperdigits ]; | ||
platforms = platforms.all; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.