libqalculate: fix build with clang

This addresses a security complaint clang makes about the source code,
and allows the build to succeed on darwin.
This commit is contained in:
Anthony Cowley 2018-02-01 21:57:21 -05:00
parent 931a0b8be8
commit 25225f0b46

View file

@ -25,6 +25,9 @@ stdenv.mkDerivation rec {
substituteInPlace libqalculate/Calculator.cc \
--replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \
--replace '"gnuplot -"' '"${gnuplot}/bin/gnuplot -"'
'' + stdenv.lib.optionalString stdenv.cc.isClang ''
substituteInPlace src/qalc.cc \
--replace 'printf(_("aborted"))' 'printf("%s", _("aborted"))'
'';
preBuild = ''