summary refs log tree commit diff
path: root/pkgs/development/libraries/fontconfig/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/fontconfig/default.nix')
-rw-r--r--pkgs/development/libraries/fontconfig/default.nix31
1 files changed, 20 insertions, 11 deletions
diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix
index b2afc427b4c..f0c4da75567 100644
--- a/pkgs/development/libraries/fontconfig/default.nix
+++ b/pkgs/development/libraries/fontconfig/default.nix
@@ -8,17 +8,23 @@ stdenv.mkDerivation rec {
     sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f";
   };
 
-  infinality_patch = with freetype.infinality; if useInfinality
-    then let subvers = "1";
+  infinality_patch =
+    let subvers = "1";
       in fetchurl {
         url = http://www.infinality.net/fedora/linux/zips/fontconfig-infinality-1-20130104_1.tar.bz2;
         sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7";
       }
-    else null;
+    ;
 
-  buildInputs = [ pkgconfig freetype expat ];
+  propagatedBuildInputs = [ freetype ];
+  buildInputs = [ pkgconfig expat ];
 
-  configureFlags = "--sysconfdir=/etc --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;
@@ -31,17 +37,20 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  # Don't try to write to /etc/fonts or /var/cache/fontconfig at install time.
-  installFlags = "sysconfdir=$(out)/etc RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy";
+  doCheck = true;
 
-  postInstall = stdenv.lib.optionalString freetype.infinality.useInfinality ''
+  # Don't try to write to /var/cache/fontconfig at install time.
+  installFlags = "sysconfdir=$(out)/etc fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false";
+
+  postInstall = ''
     cd "$out/etc/fonts" && tar xvf ${infinality_patch}
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A library for font customization and configuration";
     homepage = http://fontconfig.org/;
-    license = "bsd";
-    platforms = stdenv.lib.platforms.all;
+    license = licenses.bsd2; # custom but very bsd-like
+    platforms = platforms.all;
+    maintainers = [ maintainers.vcunat ];
   };
 }