1 { lib, stdenv, fetchFromGitHub
5 , intltool, libiconv, icu, gettext
6 , pkg-config, doxygen, autoreconfHook, buildPackages
9 stdenv.mkDerivation rec {
10 pname = "libqalculate";
13 src = fetchFromGitHub {
15 repo = "libqalculate";
17 sha256 = "sha256-/TgsGlO8RJ3L+2425odye365QqBzCHrr1Z4zUj+Ld8I=";
20 outputs = [ "out" "dev" "doc" ];
22 nativeBuildInputs = [ intltool pkg-config autoreconfHook doxygen ];
23 buildInputs = [ curl gettext libiconv readline ];
24 depsBuildBuild = [ buildPackages.stdenv.cc ];
25 propagatedBuildInputs = [ libxml2 mpfr icu ];
26 enableParallelBuilding = true;
33 substituteInPlace libqalculate/Calculator-plot.cc \
34 --replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \
35 --replace '"gnuplot - ' '"${gnuplot}/bin/gnuplot - '
36 '' + lib.optionalString stdenv.cc.isClang ''
37 substituteInPlace src/qalc.cc \
38 --replace 'printf(_("aborted"))' 'printf("%s", _("aborted"))'
48 description = "An advanced calculator library";
49 homepage = "http://qalculate.github.io";
50 license = licenses.gpl2Plus;
51 maintainers = with maintainers; [ gebner doronbehar alyaeanyx ];
53 platforms = platforms.all;