From d4561be1cb5032c00cf97fc82397f1307f156996 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 7 May 2013 13:03:25 +0200 Subject: [PATCH] fontconfig: Use /etc/fonts by default again This removes the need to set $FONTCONFIG_FILE, which is especially important when using Nixpkgs binaries on non-NixOS systems. See also 9301524c500e7e7567d5da54b3f3d7d07e53d921. This is a regression caused by a change in fontconfig's configure switches. --- pkgs/development/libraries/fontconfig/default.nix | 4 ++-- pkgs/development/libraries/freetype/default.nix | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index b0760fd33c0..2067f3457b6 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { #propagatedBuildInputs = [ expat ]; # !!! shouldn't be necessary, but otherwise pango breaks - configureFlags = "--with-confdir=/etc/fonts --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts="; + configureFlags = "--sysconfdir=/etc --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts="; # We should find a better way to access the arch reliably. crossArch = stdenv.cross.arch or null; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # Don't try to write to /etc/fonts or /var/cache/fontconfig at install time. - installFlags = "CONFDIR=$(out)/etc/fonts RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy"; + installFlags = "sysconfdir=$(out)/etc RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy"; postInstall = if !freetype.infinality.useInfinality then "" else '' cd "$out/etc/fonts" && tar xvf ${infinality_patch} diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index d79acf03bfd..cff22e9bc57 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -9,7 +9,9 @@ assert !(useEncumberedCode && useInfinality); # probably wouldn't make sense let + version = "2.4.11"; + infinality = rec { inherit useInfinality; vers = "20130104"; @@ -21,6 +23,7 @@ let }; in + stdenv.mkDerivation rec { name = "freetype-${version}"; @@ -38,8 +41,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = with stdenv.lib; " -fno-strict-aliasing" # from Gentoo, see https://bugzilla.redhat.com/show_bug.cgi?id=506840 + optionalString useEncumberedCode " -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1" - + optionalString useInfinality " -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=1" - ; + + optionalString useInfinality " -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=1"; patches = [ ./enable-validation.patch ] # from Gentoo ++ stdenv.lib.optional useInfinality [ infinality_patch ]; @@ -51,6 +53,7 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optional (!stdenv.isLinux) gnumake; enableParallelBuilding = true; + doCheck = true; postInstall =