separate libxml2 python bindings, added libconvOrLibC dependency

authored by: chaoflow, goibhniu

svn path=/nixpkgs/branches/stdenv-updates/; revision=32596
This commit is contained in:
Florian Friesdorf 2012-02-26 17:23:50 +00:00
parent 6d7dfd1415
commit 09cfb46f58
3 changed files with 34 additions and 15 deletions

View file

@ -1,6 +1,4 @@
{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true }:
assert pythonSupport -> python != null;
{ stdenv, fetchurl, libiconvOrLibc, zlib }:
stdenv.mkDerivation {
name = "libxml2-2.7.7";
@ -10,15 +8,11 @@ stdenv.mkDerivation {
sha256 = "03kkknm7xl77qfdig8mzalsi8ljsyblzin18gy3h8zranffrpyzs";
};
configureFlags = ''
${if pythonSupport then "--with-python=${python}" else ""}
'';
propagatedBuildInputs = [zlib];
propagatedBuildInputs = [ libiconvOrLibc zlib ];
setupHook = ./setup-hook.sh;
passthru = {inherit pythonSupport;};
passthru = { libiconv = libiconvOrLibc; };
meta = {
homepage = http://xmlsoft.org/;

View file

@ -4234,13 +4234,9 @@ let
libxmi = callPackage ../development/libraries/libxmi { };
libxml2 = callPackage ../development/libraries/libxml2 {
pythonSupport = false;
};
libxml2 = callPackage ../development/libraries/libxml2 { };
libxml2Python = libxml2.override {
pythonSupport = true;
};
libxml2Python = pythonPackages.libxml2;
libxmlxx = callPackage ../development/libraries/libxmlxx {
inherit (gtkLibs) glibmm;

View file

@ -665,6 +665,35 @@ let pythonPackages = python.modules // rec {
});
libxml2 = buildPythonPackage (rec {
name = pkgs.libxml2.name;
src = pkgs.libxml2.src;
buildInputs = [ python ];
propagatedBuildInputs = [ pkgs.libxml2 ];
configureFlags = "--with-python=${python}";
postConfigure = ''
cd python
sed -i setup.py \
-e "s:^ROOT.*:ROOT = r'${pkgs.libxml2}':" \
-e "s:^iconv_includes.*:iconv_includes= r'${pkgs.libxml2.libiconv}':"
'';
# has no tests
doCheck = false;
passthru = { lib = pkgs.libxml2; };
meta = {
homepage = http://xmlsoft.org/;
description = "Python bindings for libxml2";
license = "bsd";
};
});
lockfile = buildPythonPackage rec {
name = "lockfile-0.9.1";