From 7339a4004c8080a00ab64100a1c45c1ac1d40432 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 5 Sep 2018 23:33:42 +0200 Subject: [PATCH] gmpy: move outside python-packages.nix --- .../python-modules/gmpy/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +--------------- 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/gmpy/default.nix diff --git a/pkgs/development/python-modules/gmpy/default.nix b/pkgs/development/python-modules/gmpy/default.nix new file mode 100644 index 000000000000..81af4b5e5501 --- /dev/null +++ b/pkgs/development/python-modules/gmpy/default.nix @@ -0,0 +1,24 @@ +{ buildPythonPackage, fetchurl, isPyPy, gmp } : + +let + pname = "gmpy"; + version = "1.17"; +in + +buildPythonPackage { + inherit pname version; + + disabled = isPyPy; + + src = fetchurl { + url = "mirror://pypi/g/gmpy/${pname}-${version}.zip"; + sha256 = "1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14"; + }; + + buildInputs = [ gmp ]; + + meta = { + description = "GMP or MPIR interface to Python 2.4+ and 3.x"; + homepage = http://code.google.com/p/gmpy/; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d962649f71b4..c77cd8b64947 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2624,25 +2624,7 @@ in { GeoIP = callPackage ../development/python-modules/GeoIP { }; - gmpy = buildPythonPackage rec { - name = "gmpy-1.17"; - disabled = isPyPy; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/gmpy/${name}.zip"; - sha256 = "1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14"; - }; - - buildInputs = [ - pkgs.gcc - pkgs.gmp - ]; - - meta = { - description = "GMP or MPIR interface to Python 2.4+ and 3.x"; - homepage = http://code.google.com/p/gmpy/; - }; - }; + gmpy = callPackage ../development/python-modules/gmpy { }; gmpy2 = buildPythonPackage rec { name = "gmpy2-2.0.6";