libxslt: use python3 for build and as default for bindings
Changing the default may cause breakage, however, users should have already switched to `pythonPackages.libxslt` long ago.
This commit is contained in:
parent
a51aa02c78
commit
94e4dd8960
|
@ -1,9 +1,9 @@
|
||||||
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2, libgcrypt
|
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python, libgcrypt
|
||||||
, cryptoSupport ? false
|
, cryptoSupport ? false
|
||||||
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
|
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert pythonSupport -> python2 != null;
|
assert pythonSupport -> python != null;
|
||||||
assert pythonSupport -> libxml2.pythonSupport;
|
assert pythonSupport -> libxml2.pythonSupport;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||||
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
|
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
|
||||||
|
|
||||||
buildInputs = [ libxml2.dev ]
|
buildInputs = [ libxml2.dev ]
|
||||||
++ stdenv.lib.optionals pythonSupport [ libxml2.py python2 ]
|
++ stdenv.lib.optionals pythonSupport [ libxml2.py python ]
|
||||||
++ stdenv.lib.optionals cryptoSupport [ libgcrypt ];
|
++ stdenv.lib.optionals cryptoSupport [ libgcrypt ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ findXMLCatalogs ];
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
||||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
||||||
"--without-debug"
|
"--without-debug"
|
||||||
"--without-mem-debug"
|
"--without-mem-debug"
|
||||||
"--without-debugger"
|
"--without-debugger"
|
||||||
] ++ optional pythonSupport "--with-python=${python2}"
|
] ++ optional pythonSupport "--with-python=${python}"
|
||||||
++ optional (!cryptoSupport) "--without-crypto";
|
++ optional (!cryptoSupport) "--without-crypto";
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
|
@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
|
||||||
'' + optionalString pythonSupport ''
|
'' + optionalString pythonSupport ''
|
||||||
mkdir -p $py/nix-support
|
mkdir -p $py/nix-support
|
||||||
echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
|
echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
|
||||||
moveToOutput lib/python2.7 "$py"
|
moveToOutput ${python.libPrefix} "$py"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -12745,7 +12745,9 @@ in
|
||||||
|
|
||||||
libxmp = callPackage ../development/libraries/libxmp { };
|
libxmp = callPackage ../development/libraries/libxmp { };
|
||||||
|
|
||||||
libxslt = callPackage ../development/libraries/libxslt { };
|
libxslt = callPackage ../development/libraries/libxslt {
|
||||||
|
python = if stdenv.isDarwin then python2 else python3;
|
||||||
|
};
|
||||||
|
|
||||||
libixp_hg = callPackage ../development/libraries/libixp-hg { };
|
libixp_hg = callPackage ../development/libraries/libixp-hg { };
|
||||||
|
|
||||||
|
|
|
@ -3691,8 +3691,7 @@ in {
|
||||||
|
|
||||||
libxml2 = toPythonModule (pkgs.libxml2.override{pythonSupport=true; inherit python;}).py;
|
libxml2 = toPythonModule (pkgs.libxml2.override{pythonSupport=true; inherit python;}).py;
|
||||||
|
|
||||||
libxslt = disabledIf isPy3k
|
libxslt = toPythonModule (pkgs.libxslt.override{pythonSupport=true; inherit python; inherit (self) libxml2;}).py;
|
||||||
(toPythonModule (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;})).py;
|
|
||||||
|
|
||||||
limits = callPackage ../development/python-modules/limits { };
|
limits = callPackage ../development/python-modules/limits { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue