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