68d7e71424
GitOrigin-RevId: 945ec499041db73043f745fad3b2a3a01e826081
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, zlib
|
|
, cmake
|
|
, imath
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openexr";
|
|
version = "3.1.3";
|
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "AcademySoftwareFoundation";
|
|
repo = "openexr";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Bi6yTcZBWTsWWMm3A7FVYblvSXKLSkHmhGvpNYGiOzE=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "CVE-2021-45942.patch";
|
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
|
|
sha256 = "1qa8662ga5i0lyfi9mkj9s9bygdg7h1i6ahki28c664kxrlsakch";
|
|
})
|
|
];
|
|
|
|
# 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
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
propagatedBuildInputs = [ imath zlib ];
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "A high dynamic-range (HDR) image file format";
|
|
homepage = "https://www.openexr.com/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ paperdigits ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|