1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "libfpx-1.3.1-4";
5
6 src = fetchurl {
7 url = "mirror://imagemagick/delegates/${name}.tar.xz";
8 sha256 = "0pbvxbp30zqjpc0q71qbl15cb47py74c4d6a8qv1mqa6j81pb233";
9 };
10
11 # Darwin gets misdetected as Windows without this
12 NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-D__unix" else null;
13
14 # This dead code causes a duplicate symbol error in Clang so just remove it
15 postPatch = if stdenv.cc.isClang then ''
16 substituteInPlace jpeg/ejpeg.h --replace "int No_JPEG_Header_Flag" ""
17 '' else null;
18
19 meta = with stdenv.lib; {
20 homepage = http://www.imagemagick.org;
21 description = "A library for manipulating FlashPIX images";
22 license = "Flashpix";
23 platforms = platforms.all;
24 maintainers = with maintainers; [ wkennington ];
25 };
26}