nixpkgs/pkgs/development/libraries/gd/default.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl
, pkgconfig
, zlib
, libpng
, libjpeg ? null
, libwebp ? null
, libtiff ? null
, libXpm ? null
, fontconfig
, freetype
}:
stdenv.mkDerivation rec {
pname = "gd";
2020-03-24 06:48:50 +00:00
version = "2.3.0";
2015-12-23 01:59:47 +00:00
src = fetchurl {
url = "https://github.com/libgd/libgd/releases/download/${pname}-${version}/libgd-${version}.tar.xz";
2020-03-24 06:48:50 +00:00
sha256 = "0n5czhxzinvjvmhkf5l9fwjdx5ip69k5k7pj6zwb6zs1k9dibngc";
};
2015-12-23 01:59:47 +00:00
hardeningDisable = [ "format" ];
2015-12-23 01:59:47 +00:00
# -pthread gets passed to clang, causing warnings
configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ zlib fontconfig freetype ];
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
outputs = [ "bin" "dev" "out" ];
2016-05-22 12:03:16 +00:00
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
2016-06-02 17:50:28 +00:00
enableParallelBuilding = true;
2018-08-08 18:34:25 +00:00
doCheck = false; # fails 2 tests
meta = with stdenv.lib; {
2020-03-24 06:48:50 +00:00
homepage = "https://libgd.github.io/";
description = "A dynamic image creation library";
license = licenses.free; # some custom license
platforms = platforms.unix;
};
}