1{ fetchurl, stdenv, gmp, mpfr }:
2let
3 version = "1.0.3";
4in
5stdenv.mkDerivation rec {
6 name = "libmpc-${version}"; # to avoid clash with the MPD client
7
8 src = fetchurl {
9 url = "http://www.multiprecision.org/mpc/download/mpc-${version}.tar.gz";
10 sha256 = "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1";
11 };
12
13 buildInputs = [ gmp mpfr ];
14
15 CFLAGS = "-I${gmp}/include";
16
17 doCheck = true;
18
19 meta = {
20 description = "Library for multiprecision complex arithmetic with exact rounding";
21
22 longDescription =
23 '' GNU MPC is a C library for the arithmetic of complex numbers with
24 arbitrarily high precision and correct rounding of the result. It is
25 built upon and follows the same principles as GNU MPFR.
26 '';
27
28 homepage = http://mpc.multiprecision.org/;
29 license = stdenv.lib.licenses.lgpl2Plus;
30
31 platforms = stdenv.lib.platforms.all;
32 maintainers = [ ];
33 };
34}