libxslt: fix darwin build

ld: library not found for -lintl
    clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
    make[3]: *** [Makefile:544: libxsltmod.la] Error 1
This commit is contained in:
Daiderd Jordan 2020-06-13 20:14:52 +02:00
parent 1523382160
commit 0697ad33c0
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -1,10 +1,8 @@
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python, libgcrypt { stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, gettext, python, libgcrypt
, cryptoSupport ? false , cryptoSupport ? false
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform , pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
}: }:
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libxslt"; pname = "libxslt";
version = "1.1.34"; version = "1.1.34";
@ -17,6 +15,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.optional stdenv.isDarwin gettext
++ stdenv.lib.optionals pythonSupport [ libxml2.py python ] ++ stdenv.lib.optionals pythonSupport [ libxml2.py python ]
++ stdenv.lib.optionals cryptoSupport [ libgcrypt ]; ++ stdenv.lib.optionals cryptoSupport [ libgcrypt ];
@ -27,14 +26,14 @@ stdenv.mkDerivation rec {
"--without-debug" "--without-debug"
"--without-mem-debug" "--without-mem-debug"
"--without-debugger" "--without-debugger"
] ++ optional pythonSupport "--with-python=${python}" ] ++ stdenv.lib.optional pythonSupport "--with-python=${python}"
++ optional (!cryptoSupport) "--without-crypto"; ++ stdenv.lib.optional (!cryptoSupport) "--without-crypto";
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"
'' + optionalString pythonSupport '' '' + stdenv.lib.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 ${python.libPrefix} "$py" moveToOutput ${python.libPrefix} "$py"