diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2016-11-08 10:36:12 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2016-11-08 17:10:04 +0100 |
commit | be31980848dee782c4504b88c57edcfbb72c6f6b (patch) | |
tree | b2f665d2cc6c54ab9459d9641f46de177862d881 | |
parent | 459448727eb74c6db10f97692f57a2bb07381c1b (diff) |
libxslt: build python bindings
and add a pythonPackages.libxslt alias.
-rw-r--r-- | pkgs/development/libraries/libxslt/default.nix | 22 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 3 |
2 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 2afbfc2fe9973..df05431947916 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs }: +{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs +, pythonSupport ? true, python2 +}: + +assert pythonSupport -> python2 != null; +assert pythonSupport -> libxml2.pythonSupport; stdenv.mkDerivation rec { name = "libxslt-1.1.29"; @@ -10,26 +15,33 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch; - outputs = [ "bin" "dev" "out" "doc" ]; + outputs = [ "bin" "dev" "out" "doc" ] ++ stdenv.lib.optional pythonSupport "py"; - buildInputs = [ libxml2 ]; + buildInputs = [ libxml2.dev ] ++ stdenv.lib.optionals pythonSupport [ libxml2.py python2 ]; propagatedBuildInputs = [ findXMLCatalogs ]; configureFlags = [ - "--without-python" "--without-crypto" "--without-debug" "--without-mem-debug" "--without-debugger" - ]; + ] ++ stdenv.lib.optional pythonSupport "--with-python=${python2}"; postFixup = '' moveToOutput bin/xslt-config "$dev" moveToOutput lib/xsltConf.sh "$dev" moveToOutput share/man/man1 "$bin" + '' + stdenv.lib.optionalString pythonSupport '' + mkdir -p $py/nix-support + echo ${libxml2.py} >> $py/nix-support/propagated-native-build-inputs + moveToOutput lib/python2.7 "$py" ''; + passthru = { + inherit pythonSupport; + }; + meta = with stdenv.lib; { homepage = http://xmlsoft.org/XSLT/; description = "A C library and tools to do XSL transformations"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d21281c598ad..8d03fc06da025 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13447,6 +13447,9 @@ in { clblas = pkgs.clblas-cuda; }; + libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else + (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;}).py; + limnoria = buildPythonPackage rec { name = "limnoria-${version}"; version = "2016.05.06"; |