summary refs log tree commit diff
path: root/pkgs/development/libraries/zlib/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-08-27 01:14:09 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-08-27 01:14:09 +0200
commitfb59f27a4368b1436518f9f76c6e2e68f60b92a6 (patch)
treea68c3ac03a7ea04fd4b756a9d3cabf2667896e62 /pkgs/development/libraries/zlib/default.nix
parent4dccb224c584194e964b5fbef5fe2cee28c57803 (diff)
downloadnixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.gz
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.bz2
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.lz
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.xz
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.zst
nixpkgs-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.zip
WIP: getting good
Diffstat (limited to 'pkgs/development/libraries/zlib/default.nix')
-rw-r--r--pkgs/development/libraries/zlib/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index 0938e2a17a7..5f9a01208d8 100644
--- a/pkgs/development/libraries/zlib/default.nix
+++ b/pkgs/development/libraries/zlib/default.nix
@@ -13,15 +13,22 @@ stdenv.mkDerivation rec {
     sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n";
   };
 
-  configureFlags = if static then "" else "--shared";
+  outputs = [ "dev" "out" "static" "man" ];
+  buildInputs = [ stdenv.hookLib.multiout ];
+  setOutputFlags = false;
+
+  configureFlags = stdenv.lib.optional (!static) "--shared";
 
   preConfigure = ''
     if test -n "$crossConfig"; then
       export CC=$crossConfig-gcc
-      configureFlags=${if static then "" else "--shared"}
     fi
   '';
 
+  postInstall = ''
+    _moveToOutput lib/libz.a "$static"
+  '';
+
   # As zlib takes part in the stdenv building, we don't want references
   # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";