diff options
author | Antoine Eiche <lewo@abesis.fr> | 2018-06-22 17:44:05 +0200 |
---|---|---|
committer | Antoine Eiche <lewo@abesis.fr> | 2018-06-22 21:00:20 +0200 |
commit | 5bfdf34bed463d0cfedef871e44e5ac4499ad3fb (patch) | |
tree | 65a076adfce3e43fc62b5da733b3006d6246061f /pkgs/development/libraries/libxml2 | |
parent | 25ee8e0f70d510c8a828678ae6a0a9782215d0e8 (diff) |
libxml2: add enableStatic argument
If `enableStatic` is set to true, the output `static` contains the static library.
Diffstat (limited to 'pkgs/development/libraries/libxml2')
-rw-r--r-- | pkgs/development/libraries/libxml2/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index be2f83cb498e0..8a3d7abdfa576 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -3,6 +3,7 @@ , buildPlatform, hostPlatform , pythonSupport ? buildPlatform == hostPlatform , icuSupport ? false, icu ? null +, enableStatic ? false }: let @@ -18,7 +19,8 @@ in stdenv.mkDerivation rec { }; outputs = [ "bin" "dev" "out" "man" "doc" ] - ++ lib.optional pythonSupport "py"; + ++ lib.optional pythonSupport "py" + ++ lib.optional enableStatic "static"; propagatedBuildOutputs = "out bin" + lib.optionalString pythonSupport " py"; buildInputs = lib.optional pythonSupport python @@ -32,7 +34,8 @@ in stdenv.mkDerivation rec { configureFlags = lib.optional pythonSupport "--with-python=${python}" ++ lib.optional icuSupport "--with-icu" - ++ [ "--exec_prefix=$dev" ]; + ++ [ "--exec_prefix=$dev" ] + ++ lib.optional enableStatic "--enable-static"; enableParallelBuilding = true; @@ -57,6 +60,8 @@ in stdenv.mkDerivation rec { moveToOutput bin/xml2-config "$dev" moveToOutput lib/xml2Conf.sh "$dev" moveToOutput share/man/man1 "$bin" + '' + lib.optionalString enableStatic '' + moveToOutput lib/libxml2.a "$static" ''; passthru = { inherit version; pythonSupport = pythonSupport; }; |