From 25225f0b4646f0353e079d0b19739494d63f249f Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Thu, 1 Feb 2018 21:57:21 -0500 Subject: [PATCH] libqalculate: fix build with clang This addresses a security complaint clang makes about the source code, and allows the build to succeed on darwin. --- pkgs/development/libraries/libqalculate/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libqalculate/default.nix b/pkgs/development/libraries/libqalculate/default.nix index 0e67f970b763..89b71c1855da 100644 --- a/pkgs/development/libraries/libqalculate/default.nix +++ b/pkgs/development/libraries/libqalculate/default.nix @@ -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 = ''