From 3e1f1f76bb1fa8b984db9d7ab3405cca0e5d0eb6 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 15:11:35 -0400 Subject: [PATCH] pythonPackages.pycountry: refactor move to python-modules --- .../python-modules/pycountry/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 10 +-------- 2 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/python-modules/pycountry/default.nix diff --git a/pkgs/development/python-modules/pycountry/default.nix b/pkgs/development/python-modules/pycountry/default.nix new file mode 100644 index 000000000000..90d573aaaa77 --- /dev/null +++ b/pkgs/development/python-modules/pycountry/default.nix @@ -0,0 +1,22 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, +}: + +buildPythonPackage rec { + pname = "pycountry"; + version = "1.17"; + + src = fetchPypi { + inherit pname version; + sha256 = "1qvhq0c9xsh6d4apcvjphfzl6xnwhnk4jvhr8x2fdfnmb034lc26"; + }; + + meta = with stdenv.lib; { + homepage = https://bitbucket.org/flyingcircus/pycountry; + description = "ISO country, subdivision, language, currency and script definitions and their translations"; + license = licenses.lgpl2; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0d17d417ca47..8ca78054564e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3035,15 +3035,7 @@ in { FormEncode = callPackage ../development/python-modules/FormEncode { }; - pycountry = buildPythonPackage rec { - name = "pycountry-${version}"; - version = "1.17"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pycountry/${name}.tar.gz"; - sha256 = "1qvhq0c9xsh6d4apcvjphfzl6xnwhnk4jvhr8x2fdfnmb034lc26"; - }; - }; + pycountry = callPackage ../development/python-modules/pycountry { }; nine = buildPythonPackage rec { name = "nine-${version}";