From 33bcafcf5b7192bffc751191ece6a9d11684987e Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Sat, 15 Jul 2017 14:00:15 +0700 Subject: [PATCH] python.pkgs.stripe: move to separate expression --- .../python-modules/stripe/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +---------------- 2 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/stripe/default.nix diff --git a/pkgs/development/python-modules/stripe/default.nix b/pkgs/development/python-modules/stripe/default.nix new file mode 100644 index 00000000000..5a1e114fb25 --- /dev/null +++ b/pkgs/development/python-modules/stripe/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchPypi +, unittest2, mock, requests }: + +buildPythonPackage rec { + pname = "stripe"; + version = "1.41.1"; + name = "${pname}-${version}"; + + # Tests require network connectivity and there's no easy way to disable + # them. ~ C. + doCheck = false; + + src = fetchPypi { + inherit pname version; + sha256 = "0zvffvq933ia5w5ll6xhx2zgvppgc6zc2mxhc6f0kypw5g2fxvz5"; + }; + + buildInputs = [ unittest2 mock ]; + + propagatedBuildInputs = [ requests ]; + + meta = with stdenv.lib; { + description = "Stripe Python bindings"; + homepage = "https://github.com/stripe/stripe-python"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4d50d997fdb..276885afc43 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -30004,29 +30004,7 @@ EOF typed-ast = callPackage ../development/python-modules/typed-ast { }; - stripe = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "stripe"; - version = "1.41.1"; - - # Tests require network connectivity and there's no easy way to disable - # them. ~ C. - doCheck = false; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/${pname}/${name}.tar.gz"; - sha256 = "0zvffvq933ia5w5ll6xhx2zgvppgc6zc2mxhc6f0kypw5g2fxvz5"; - }; - - buildInputs = with self; [ unittest2 mock ]; - propagatedBuildInputs = with self; [ requests ]; - - meta = { - homepage = "https://github.com/stripe/stripe-python"; - description = "Stripe Python bindings"; - license = licenses.mit; - }; - }; + stripe = callPackage ../development/python-modules/stripe { }; uranium = callPackage ../development/python-modules/uranium { };