diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 2afbfc2fe99..df054319479 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 3d21281c598..8d03fc06da0 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";