diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 8fc32babd3b..e25074f8d12 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, python ? null, pythonSupport ? true }: +{ stdenv, fetchurl, zlib, xz, python ? null, pythonSupport ? true }: assert pythonSupport -> python != null; @@ -14,7 +14,12 @@ stdenv.mkDerivation rec { configureFlags = stdenv.lib.optionalString pythonSupport "--with-python=${python}"; - buildInputs = stdenv.lib.optional pythonSupport [ python ]; + buildInputs = (stdenv.lib.optional pythonSupport [ python ]) + + # Libxml2 has an optional dependency on liblzma. However, on impure + # platforms, it may end up using that from /usr/lib, and thus lack a + # RUNPATH for that, leading to undefined references for its users. + ++ (stdenv.lib.optional stdenv.isFreeBSD xz); propagatedBuildInputs = [ zlib ]; @@ -26,7 +31,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://xmlsoft.org/; - description = "A XML parsing library for C"; + description = "An XML parsing library for C"; license = "bsd"; platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.eelco ];