1{ lib, stdenv, fetchurl, gmp }:
2
3# Note: this package is used for bootstrapping fetchurl, and thus
4# cannot use fetchpatch! All mutable patches (generated by GitHub or
5# cgit) that are needed here should be included directly in Nixpkgs as
6# files.
7
8stdenv.mkDerivation rec {
9 version = "4.1.0";
10 pname = "mpfr";
11
12 src = fetchurl {
13 urls = [
14 #"https://www.mpfr.org/${name}/${name}.tar.xz"
15 "mirror://gnu/mpfr/${pname}-${version}.tar.xz"
16 ];
17 sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c";
18 };
19
20 outputs = [ "out" "dev" "doc" "info" ];
21
22 strictDeps = true;
23 # mpfr.h requires gmp.h
24 propagatedBuildInputs = [ gmp ];
25
26 configureFlags =
27 lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++
28 lib.optional stdenv.hostPlatform.is64bit "--with-pic";
29
30 doCheck = true; # not cross;
31
32 enableParallelBuilding = true;
33
34 meta = {
35 homepage = "https://www.mpfr.org/";
36 description = "Library for multiple-precision floating-point arithmetic";
37
38 longDescription = ''
39 The GNU MPFR library is a C library for multiple-precision
40 floating-point computations with correct rounding. MPFR is
41 based on the GMP multiple-precision library.
42
43 The main goal of MPFR is to provide a library for
44 multiple-precision floating-point computation which is both
45 efficient and has a well-defined semantics. It copies the good
46 ideas from the ANSI/IEEE-754 standard for double-precision
47 floating-point arithmetic (53-bit mantissa).
48 '';
49
50 license = lib.licenses.lgpl2Plus;
51
52 maintainers = [ ];
53 platforms = lib.platforms.all;
54 };
55}