libxslt: build python bindings
and add a pythonPackages.libxslt alias.
This commit is contained in:
parent
459448727e
commit
be31980848
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "libxslt-1.1.29";
|
name = "libxslt-1.1.29";
|
||||||
@ -10,26 +15,33 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch;
|
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 ];
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--without-python"
|
|
||||||
"--without-crypto"
|
"--without-crypto"
|
||||||
"--without-debug"
|
"--without-debug"
|
||||||
"--without-mem-debug"
|
"--without-mem-debug"
|
||||||
"--without-debugger"
|
"--without-debugger"
|
||||||
];
|
] ++ stdenv.lib.optional pythonSupport "--with-python=${python2}";
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
moveToOutput bin/xslt-config "$dev"
|
moveToOutput bin/xslt-config "$dev"
|
||||||
moveToOutput lib/xsltConf.sh "$dev"
|
moveToOutput lib/xsltConf.sh "$dev"
|
||||||
moveToOutput share/man/man1 "$bin"
|
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; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://xmlsoft.org/XSLT/;
|
homepage = http://xmlsoft.org/XSLT/;
|
||||||
description = "A C library and tools to do XSL transformations";
|
description = "A C library and tools to do XSL transformations";
|
||||||
|
@ -13447,6 +13447,9 @@ in {
|
|||||||
clblas = pkgs.clblas-cuda;
|
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 {
|
limnoria = buildPythonPackage rec {
|
||||||
name = "limnoria-${version}";
|
name = "limnoria-${version}";
|
||||||
version = "2016.05.06";
|
version = "2016.05.06";
|
||||||
|
Loading…
Reference in New Issue
Block a user