summary refs log tree commit diff
path: root/pkgs/development/libraries/glib/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-28 11:52:23 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-10-28 11:52:23 +0100
commit55b7d3a181f644586bfc4c6ee5be0dd2a213a733 (patch)
treea41b284b3ad0f7a415b08518eda43e37777bc223 /pkgs/development/libraries/glib/default.nix
parent30845d07d8110c034156407c71d71e22f92d194a (diff)
downloadnixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar.gz
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar.bz2
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar.lz
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar.xz
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.tar.zst
nixpkgs-55b7d3a181f644586bfc4c6ee5be0dd2a213a733.zip
glib: fixup output paths and use system pcre
Now pcre costs us <0.5 MB and using internal one would cost ~0.2 MB,
so if we take into account that pcre is often used, e.g. by grep...
Diffstat (limited to 'pkgs/development/libraries/glib/default.nix')
-rw-r--r--pkgs/development/libraries/glib/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index ae64f1f68e0..6b6b39848e2 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -31,12 +31,12 @@ let
   # This is intended to be run in postInstall of any package
   # which has $out/include/ containing just some disjunct directories.
   flattenInclude = ''
-    for dir in "$out"/include/*; do
-      cp -r "$dir"/* "$out/include/"
+    for dir in "''${!outputInclude}"/include/*; do
+      cp -r "$dir"/* "''${!outputInclude}/include/"
       rm -r "$dir"
       ln -s . "$dir"
     done
-    ln -sr -t "$out/include/" "$out"/lib/*/include/* 2>/dev/null || true
+    ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
   '';
 
   ver_maj = "2.46";
@@ -53,20 +53,21 @@ stdenv.mkDerivation rec {
 
   patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
 
-  outputs = [ "dev" "out" "doc" ];
+  outputs = [ "dev" "out" "docdev" ];
   outputBin = "dev";
 
   setupHook = ./setup-hook.sh;
 
-  buildInputs = [ libelf setupHook/*get the gtk-doc hook*/ ]
+  buildInputs = [ libelf setupHook pcre ]
     ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ];
 
   nativeBuildInputs = [ pkgconfig gettext perl python ];
 
-  propagatedBuildInputs = [ zlib libffi libiconv /*pcre*/ ]
+  propagatedBuildInputs = [ zlib libffi libiconv ]
     ++ libintlOrEmpty;
 
-  configureFlags = [ ] # [ "--with-pcre=system" ] # internal pcre only adds <200kB
+  # internal pcre would only add <200kB, but it's relatively common
+  configureFlags = [ "--with-pcre=system" ]
     ++ optional stdenv.isDarwin "--disable-compile-warnings"
     ++ optional stdenv.isSunOS "--disable-modular-tests";