1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPyPy
5, gmp
6, mpfr
7, libmpc
8}:
9
10let
11 pname = "gmpy2";
12 version = "2.1.0b5";
13in
14
15buildPythonPackage {
16 inherit pname version;
17
18 disabled = isPyPy;
19
20 src = fetchFromGitHub {
21 owner = "aleaxit";
22 repo = "gmpy";
23 rev = "gmpy2-${version}";
24 sha256 = "1mqzyp7qwqqyk6jbicgx22svdy2106xwhmhfvdf0vpnmwswcxclb";
25 };
26
27 buildInputs = [ gmp mpfr libmpc ];
28
29 meta = with lib; {
30 description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
31 homepage = "https://github.com/aleaxit/gmpy/";
32 license = licenses.gpl3Plus;
33 };
34}