@@ -0,0 +1,50 @@
1+{ stdenv, fetchFromGitHub, unzip, re2, openfx, zlib, ilmbase, mesa, openexr }:
2+
3+stdenv.mkDerivation rec
4+{
5+ name = "openexrid-unstable-${version}";
6+ version = "2017-09-17";
7+
8+ src = fetchFromGitHub {
9+ owner = "MercenariesEngineering";
10+ repo = "openexrid";
11+ rev = "bec0081548a096f9bcdd1504970c96264b0fc050";
12+ sha256 = "0h4b74lv59p4hhrvrqdmlnchn2i0v5id4kl8xc7j26l9884q0383";
13+ };
14+
15+ outputs = [ "dev" "out" "lib" ];
16+
17+ patches = [ ./openexrid.patch ];
18+
19+ NIX_CFLAGS_COMPILE=''-I${ilmbase.dev}/include/OpenEXR
20+ -I${openexr.dev}/include/OpenEXR
21+ -I${openfx.dev}/include/OpenFX
22+ '';
23+
24+ buildInputs = [ unzip re2 openfx zlib ilmbase mesa openexr ];
25+
26+ enableParallelBuilding = true;
27+
28+ buildPhase = ''
29+ mkdir openexrid/release
30+
31+ PREFIX=$out make -C openexrid install
32+
33+ mkdir $dev;
34+ mkdir $lib;
35+ '';
36+
37+ installPhase = ''
38+ find $out
39+ mv $out/include $dev/
40+ mv $out/lib $lib/
41+ '';
42+
43+ meta = with stdenv.lib; {
44+ description = "OpenEXR files able to isolate any object of a CG image with a perfect antialiazing";
45+ homepage = "https://github.com/MercenariesEngineering/openexrid";
46+ maintainers = [ maintainers.guibou ];
47+ platforms = platforms.all;
48+ license = licenses.mit;
49+ };
50+}