freetype: fix freetype-config

This commit is contained in:
Piotr Bogdan 2018-03-22 21:36:07 +00:00 committed by Nikolay Amiantov
parent 91072b7b23
commit 077dedbf24

View File

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, copyPathsToStore
, hostPlatform
, pkgconfig, which
, pkgconfig, which, makeWrapper
, zlib, bzip2, libpng, gnumake, glib
, # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering).
@ -38,7 +38,7 @@ in stdenv.mkDerivation rec {
propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkgconfig which ]
nativeBuildInputs = [ pkgconfig which makeWrapper ]
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ optional (!stdenv.isLinux) gnumake;
@ -58,7 +58,10 @@ in stdenv.mkDerivation rec {
doCheck = true;
postInstall = glib.flattenInclude;
postInstall = glib.flattenInclude + ''
wrapProgram "$dev/bin/freetype-config" \
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"
'';
crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc or null != "msvcrt") {
# Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead