lol
at 18.09-beta 47 lines 1.4 kB view raw
1{ stdenv, fetchFromGitHub, mpfr, libxml2, intltool, pkgconfig, doxygen, 2 autoreconfHook, readline, libiconv, icu, curl, gnuplot, gettext }: 3 4stdenv.mkDerivation rec { 5 name = "libqalculate-${version}"; 6 version = "2.6.2"; 7 8 src = fetchFromGitHub { 9 owner = "qalculate"; 10 repo = "libqalculate"; 11 rev = "v${version}"; 12 sha256 = "1wfffki5ib65z9ndph2c4a17qx62f07q12adzabs7ij9gv94y9j5"; 13 }; 14 15 outputs = [ "out" "dev" "doc" ]; 16 17 nativeBuildInputs = [ intltool pkgconfig autoreconfHook doxygen ]; 18 buildInputs = [ curl gettext libiconv readline ]; 19 propagatedBuildInputs = [ libxml2 mpfr icu ]; 20 enableParallelBuilding = true; 21 22 preConfigure = '' 23 intltoolize -f 24 ''; 25 26 patchPhase = '' 27 substituteInPlace libqalculate/Calculator.cc \ 28 --replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \ 29 --replace '"gnuplot -"' '"${gnuplot}/bin/gnuplot -"' 30 '' + stdenv.lib.optionalString stdenv.cc.isClang '' 31 substituteInPlace src/qalc.cc \ 32 --replace 'printf(_("aborted"))' 'printf("%s", _("aborted"))' 33 ''; 34 35 preBuild = '' 36 pushd docs/reference 37 doxygen Doxyfile 38 popd 39 ''; 40 41 meta = with stdenv.lib; { 42 description = "An advanced calculator library"; 43 homepage = http://qalculate.github.io; 44 maintainers = with maintainers; [ gebner ]; 45 platforms = platforms.all; 46 }; 47}