1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isPyPy 5, gmp 6, mpfr 7, libmpc 8}: 9 10let 11 pname = "gmpy2"; 12 version = "2.1.2"; 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 hash = "sha256-ARCttNzRA+Ji2j2NYaSCDXgvoEg01T9BnYadyqON2o0="; 25 }; 26 27 buildInputs = [ gmp mpfr libmpc ]; 28 29 pythonImportsCheck = [ "gmpy2" ]; 30 31 meta = with lib; { 32 description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x"; 33 homepage = "https://github.com/aleaxit/gmpy/"; 34 license = licenses.gpl3Plus; 35 }; 36}