From e0b97819b7b6351ccd269c390f39a6f58fe86a45 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 1 Apr 2018 13:59:27 +0200 Subject: [PATCH] pythonPackages.pytest-catchlog: Move to own file --- .../pytest-catchlog/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +--------------- 2 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/pytest-catchlog/default.nix diff --git a/pkgs/development/python-modules/pytest-catchlog/default.nix b/pkgs/development/python-modules/pytest-catchlog/default.nix new file mode 100644 index 000000000000..fb020ba471fc --- /dev/null +++ b/pkgs/development/python-modules/pytest-catchlog/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest, unzip }: + +buildPythonPackage rec { + pname = "pytest-catchlog"; + version = "1.2.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"; + extension = "zip"; + }; + + buildInputs = [ pytest unzip ]; + checkPhase = "make test"; + + # Requires pytest < 3.1 + doCheck = false; + + meta = with stdenv.lib; { + license = licenses.mit; + homepage = https://pypi.python.org/pypi/pytest-catchlog/; + description = "py.test plugin to catch log messages. This is a fork of pytest-capturelog."; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 28bd69d55272..08c36236c633 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1916,26 +1916,7 @@ in { pytestcache = callPackage ../development/python-modules/pytestcache { }; - pytest-catchlog = buildPythonPackage rec { - name = "pytest-catchlog-1.2.2"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/pytest-catchlog/${name}.zip"; - sha256 = "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"; - }; - - buildInputs = with self; [ pytest ]; - - checkPhase = "make test"; - - # Requires pytest < 3.1 - doCheck = false; - - meta = { - license = licenses.mit; - homepage = https://pypi.python.org/pypi/pytest-catchlog/; - description = "py.test plugin to catch log messages. This is a fork of pytest-capturelog."; - }; - }; + pytest-catchlog = callPackage ../development/python-modules/pytest-catchlog { }; pytest-cram = callPackage ../development/python-modules/pytest-cram { };