nixpkgs/pkgs/development/libraries/openexr/3.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Normal View History

2021-08-17 03:29:53 +00:00
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
2021-08-17 03:29:53 +00:00
, zlib
, cmake
, imath
}:
stdenv.mkDerivation rec {
pname = "openexr";
2023-03-30 01:15:08 +00:00
version = "3.1.7";
2021-08-17 03:29:53 +00:00
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "openexr";
rev = "v${version}";
2023-03-30 01:15:08 +00:00
sha256 = "sha256-Kl+aOA797aZvrvW4ZQNHdSU7YFPieZEzX3aYeaoH6eU=";
2021-08-17 03:29:53 +00:00
};
2022-07-24 11:53:20 +00:00
outputs = [ "bin" "dev" "out" "doc" ];
2022-01-03 17:50:36 +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-06-25 08:02:06 +00:00
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ imath zlib ];
2021-08-17 03:29:53 +00:00
# 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.isi686 "-msse2 -mfpmath=sse";
# https://github.com/AcademySoftwareFoundation/openexr/issues/1400
doCheck = !stdenv.isAarch32;
2022-01-03 17:50:36 +00:00
2021-08-17 03:29:53 +00:00
meta = with lib; {
description = "A high dynamic-range (HDR) image file format";
2022-07-24 11:53:20 +00:00
homepage = "https://www.openexr.com";
2021-08-17 03:29:53 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ paperdigits ];
platforms = platforms.all;
};
}