Merge pull request #21081 from Mic92/libxslt

libxslt: add option to enable crypto support
This commit is contained in:
Jaka Hudoklin 2016-12-12 01:43:04 +01:00 committed by GitHub
commit 76a791b61c

View file

@ -1,10 +1,13 @@
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs { stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2
, python2, pythonSupport ? (! stdenv ? cross) , cryptoSupport ? false
, pythonSupport ? (! stdenv ? cross)
}: }:
assert pythonSupport -> python2 != null; assert pythonSupport -> python2 != null;
assert pythonSupport -> libxml2.pythonSupport; assert pythonSupport -> libxml2.pythonSupport;
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libxslt-1.1.29"; name = "libxslt-1.1.29";
@ -21,18 +24,18 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ findXMLCatalogs ]; propagatedBuildInputs = [ findXMLCatalogs ];
configureFlags = [ # TODO move cryptoSupport as last flag, when upgrading libxslt
"--without-crypto" configureFlags = optional (!cryptoSupport) "--without-crypto" ++ [
"--without-debug" "--without-debug"
"--without-mem-debug" "--without-mem-debug"
"--without-debugger" "--without-debugger"
] ++ stdenv.lib.optional pythonSupport "--with-python=${python2}"; ] ++ 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 '' '' + optionalString pythonSupport ''
mkdir -p $py/nix-support mkdir -p $py/nix-support
echo ${libxml2.py} >> $py/nix-support/propagated-native-build-inputs echo ${libxml2.py} >> $py/nix-support/propagated-native-build-inputs
moveToOutput lib/python2.7 "$py" moveToOutput lib/python2.7 "$py"