From 9d196ef641b9d5c83972021eca90b05d57ef395e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 26 Jan 2018 03:33:19 +0100 Subject: [PATCH] pythonPackages.colorlog: 2.6.1 -> 3.1.2 --- .../python-modules/colorlog/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +-------------- 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/colorlog/default.nix diff --git a/pkgs/development/python-modules/colorlog/default.nix b/pkgs/development/python-modules/colorlog/default.nix new file mode 100644 index 000000000000..e737b8848975 --- /dev/null +++ b/pkgs/development/python-modules/colorlog/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest }: + +buildPythonPackage rec { + pname = "colorlog"; + version = "3.1.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0i21sd6pggr2gqza41vyq2rqyb552wf5iwl4bc16i7kqislbd53z"; + }; + + checkInputs = [ pytest ]; + + checkPhase = '' + py.test -p no:logging + ''; + + meta = with stdenv.lib; { + description = "Log formatting with colors"; + homepage = https://github.com/borntyping/python-colorlog; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e45418fba46d..e6d825030cf9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1397,24 +1397,7 @@ in { }; }; - colorlog = buildPythonPackage rec { - name = "colorlog-${version}"; - version = "2.6.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/colorlog/${name}.tar.gz"; - sha256 = "0djv6ky1yk28s1l093w8plg19kp88q4nyrm1vfxyq0s9j4pix29l"; - }; - - # No tests included - doCheck = false; - - meta = { - description = "Log formatting with colors"; - homepage = https://github.com/borntyping/python-colorlog; - license = licenses.free; # BSD-like - }; - }; + colorlog = callPackage ../development/python-modules/colorlog { }; colour = buildPythonPackage rec { name = "${pname}-${version}";