fontconfig: add an upstream bugfix, remove other config inclusion

This commit is contained in:
Vladimír Čunát 2014-10-19 09:54:07 +02:00
parent 0927405a37
commit 27968ece0f
1 changed files with 9 additions and 2 deletions
pkgs/development/libraries/fontconfig

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, freetype, expat, libxslt, fontbhttf }: { stdenv, fetchurl, fetchpatch, pkgconfig, freetype, expat, libxslt, fontbhttf }:
let let
configVersion = "2.11"; # bump whenever fontconfig breaks compatibility with older configurations configVersion = "2.11"; # bump whenever fontconfig breaks compatibility with older configurations
@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
} }
; ;
patches = [(fetchpatch {
url = "http://cgit.freedesktop.org/fontconfig/patch/?id=f44157c809d280e2a0ce87fb078fc4b278d24a67";
sha256 = "19s5irclg4irj2yxd7xw9yikbazs9263px8qbv4r21asw06nfalv";
})];
propagatedBuildInputs = [ freetype ]; propagatedBuildInputs = [ freetype ];
buildInputs = [ pkgconfig libxslt expat ]; buildInputs = [ pkgconfig libxslt expat ];
@ -47,6 +52,7 @@ stdenv.mkDerivation rec {
# Add a default font for non-nixos systems. fontbhttf is only about 1mb. # Add a default font for non-nixos systems. fontbhttf is only about 1mb.
postInstall = '' postInstall = ''
cd "$out/etc/fonts" && tar xvf ${infinality_patch} cd "$out/etc/fonts" && tar xvf ${infinality_patch}
rm conf.d/{50-user,51-local}.conf
xsltproc --stringparam fontDirectories "${fontbhttf}" \ xsltproc --stringparam fontDirectories "${fontbhttf}" \
--stringparam fontconfig "$out" \ --stringparam fontconfig "$out" \
--stringparam fontconfigConfigVersion "${configVersion}" \ --stringparam fontconfigConfigVersion "${configVersion}" \
@ -59,7 +65,7 @@ stdenv.mkDerivation rec {
passthru = { passthru = {
inherit configVersion; inherit configVersion;
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A library for font customization and configuration"; description = "A library for font customization and configuration";
homepage = http://fontconfig.org/; homepage = http://fontconfig.org/;
@ -68,3 +74,4 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.vcunat ]; maintainers = [ maintainers.vcunat ];
}; };
} }