diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
commit | fb59f27a4368b1436518f9f76c6e2e68f60b92a6 (patch) | |
tree | a68c3ac03a7ea04fd4b756a9d3cabf2667896e62 /pkgs/development/libraries/zlib | |
parent | 4dccb224c584194e964b5fbef5fe2cee28c57803 (diff) |
WIP: getting good
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 0938e2a17a796..5f9a01208d84d 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"; |