From 0e26b1e3661e748cedc4c19049ecc6e6ed8a01ae Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 14:07:29 -0400 Subject: [PATCH] pythonPackages.keepalive: refactor move to python-modules --- .../python-modules/keepalive/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +------------- 2 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/keepalive/default.nix diff --git a/pkgs/development/python-modules/keepalive/default.nix b/pkgs/development/python-modules/keepalive/default.nix new file mode 100644 index 000000000000..c53bc25d198d --- /dev/null +++ b/pkgs/development/python-modules/keepalive/default.nix @@ -0,0 +1,24 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "keepalive"; + version = "0.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "3c6b96f9062a5a76022f0c9d41e9ef5552d80b1cadd4fccc1bf8f183ba1d1ec1"; + }; + + # No tests included + doCheck = false; + + meta = with stdenv.lib; { + description = "An HTTP handler for `urllib2` that supports HTTP 1.1 and keepalive"; + homepage = "https://github.com/wikier/keepalive"; + license = licenses.asl20; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c916473b8e39..12627d6ca795 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2326,23 +2326,7 @@ in { kaptan = callPackage ../development/python-modules/kaptan { }; - keepalive = buildPythonPackage rec { - name = "keepalive-${version}"; - version = "0.5"; - - src = pkgs.fetchurl { - url = "mirror://pypi/k/keepalive/keepalive-${version}.tar.gz"; - sha256 = "3c6b96f9062a5a76022f0c9d41e9ef5552d80b1cadd4fccc1bf8f183ba1d1ec1"; - }; - - # No tests included - doCheck = false; - - meta = with stdenv.lib; { - description = "An HTTP handler for `urllib2` that supports HTTP 1.1 and keepalive"; - homepage = "https://github.com/wikier/keepalive"; - }; - }; + keepalive = callPackage ../development/python-modules/keepalive { }; keyrings-alt = callPackage ../development/python-modules/keyrings-alt {};