1 { lib, stdenv, fetchurl, gmp }:
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
8 stdenv.mkDerivation rec {
14 #"https://www.mpfr.org/${name}/${name}.tar.xz"
15 "mirror://gnu/mpfr/${pname}-${version}.tar.xz"
17 sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c";
20 outputs = [ "out" "dev" "doc" "info" ];
23 # mpfr.h requires gmp.h
24 propagatedBuildInputs = [ gmp ];
27 lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++
28 lib.optional stdenv.hostPlatform.is64bit "--with-pic";
30 doCheck = true; # not cross;
32 enableParallelBuilding = true;
35 homepage = "https://www.mpfr.org/";
36 description = "Library for multiple-precision floating-point arithmetic";
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.
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).
50 license = lib.licenses.lgpl2Plus;
53 platforms = lib.platforms.all;