1{ lib, stdenv, fetchurl, m4, which, yasm }:
2
3stdenv.mkDerivation rec {
4 pname = "mpir";
5 version = "3.0.0";
6
7 nativeBuildInputs = [ m4 which yasm ];
8
9 src = fetchurl {
10 url = "https://mpir.org/mpir-${version}.tar.bz2";
11 sha256 = "1fvmhrqdjs925hzr2i8bszm50h00gwsh17p2kn2pi51zrxck9xjj";
12 };
13
14 configureFlags = [ "--enable-cxx" ]
15 ++ lib.optionals stdenv.isLinux [ "--enable-fat" ];
16
17 meta = {
18 description = "A highly optimised library for bignum arithmetic forked from GMP";
19 license = lib.licenses.lgpl3Plus;
20 maintainers = [lib.maintainers.raskin];
21 platforms = lib.platforms.unix;
22 downloadPage = "https://mpir.org/downloads.html";
23 homepage = "https://mpir.org/";
24 };
25}