diff --git a/pkgs/development/python-modules/gmpy2/default.nix b/pkgs/development/python-modules/gmpy2/default.nix new file mode 100644 index 000000000000..5d1f82356a01 --- /dev/null +++ b/pkgs/development/python-modules/gmpy2/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchurl, isPyPy, gmp, mpfr, libmpc } : + +let + pname = "gmpy2"; + version = "2.0.8"; +in + +buildPythonPackage { + inherit pname version; + + disabled = isPyPy; + + src = fetchurl { + url = "mirror://pypi/g/gmpy2/${pname}-${version}.zip"; + sha256 = "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx"; + }; + + buildInputs = [ gmp mpfr libmpc ]; + + meta = with stdenv.lib; { + description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x"; + homepage = http://code.google.com/p/gmpy/; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c77cd8b64947..7e9e362b3dea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2626,28 +2626,7 @@ in { gmpy = callPackage ../development/python-modules/gmpy { }; - gmpy2 = buildPythonPackage rec { - name = "gmpy2-2.0.6"; - disabled = isPyPy; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/gmpy2/${name}.zip"; - sha256 = "5041d0ae24407c24487106099f5bcc4abb1a5f58d90e6712cc95321975eddbd4"; - }; - - buildInputs = [ - pkgs.gcc - pkgs.gmp - pkgs.mpfr - pkgs.libmpc - ]; - - meta = { - description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x"; - homepage = http://code.google.com/p/gmpy/; - license = licenses.gpl3Plus; - }; - }; + gmpy2 = callPackage ../development/python-modules/gmpy2 { }; gmusicapi = with pkgs; buildPythonPackage rec { name = "gmusicapi-10.1.0";