Skip to content

Commit

Permalink
freeimage: fix build with gcc6
Browse files Browse the repository at this point in the history
  • Loading branch information
globin committed Jan 25, 2017
1 parent 8cae089 commit d31b3a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgs/development/libraries/freeimage/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{stdenv, fetchurl, unzip, darwin}:
{ stdenv, fetchurl, unzip, darwin }:

stdenv.mkDerivation {
name = "freeimage-3.17.0";

src = fetchurl {
url = mirror://sourceforge/freeimage/FreeImage3170.zip;
sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v";
};

buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;

prePatch = if stdenv.isDarwin
then ''
sed -e 's/gcc-4.0/clang/g' \
Expand Down Expand Up @@ -38,6 +42,8 @@ stdenv.mkDerivation {
preInstall = "mkdir -p $out/include $out/lib";
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip install";

NIX_CFLAGS_COMPILE = "-Wno-narrowing";

meta = {
description = "Open Source library for accessing popular graphics image file formats";
homepage = http://freeimage.sourceforge.net/;
Expand Down

0 comments on commit d31b3a9

Please sign in to comment.