2020-05-15 21:57:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, zlib
|
|
|
|
, ilmbase
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchpatch
|
2020-05-15 21:57:56 +00:00
|
|
|
, cmake
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openexr";
|
2021-07-21 07:28:18 +00:00
|
|
|
version = "2.5.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AcademySoftwareFoundation";
|
|
|
|
repo = "openexr";
|
|
|
|
rev = "v${version}";
|
2021-07-21 07:28:18 +00:00
|
|
|
sha256 = "1vja0rbilcd1wn184w8nbcmck00n7bfwlddwiaxw8dhj64nx4468";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
patches = [
|
|
|
|
# Fix pkg-config paths
|
|
|
|
(fetchpatch {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/2f19a01923885fda75ec9d19332de080ec7102bd.patch";
|
|
|
|
sha256 = "1yxmrdzq1x1911wdzwnzr29jmg2r4wd4yx3vhjn0y5dpny0ri5y5";
|
2020-09-25 04:45:31 +00:00
|
|
|
})
|
2022-01-26 04:04:25 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2021-45942.patch";
|
|
|
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
|
|
|
|
stripLen = 4;
|
|
|
|
extraPrefix = "OpenEXR/IlmImf/";
|
|
|
|
sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy";
|
|
|
|
})
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
propagatedBuildInputs = [ ilmbase zlib ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A high dynamic-range (HDR) image file format";
|
|
|
|
homepage = "https://www.openexr.com/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|