From f648930a0b3ad1afe9242fa1b342c6991d6c6367 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 1 Apr 2018 14:04:29 +0200 Subject: [PATCH] pythonPackages.pytest-fixture-config: Move to own file --- .../pytest-fixture-config/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +------------------ 2 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/pytest-fixture-config/default.nix diff --git a/pkgs/development/python-modules/pytest-fixture-config/default.nix b/pkgs/development/python-modules/pytest-fixture-config/default.nix new file mode 100644 index 00000000000..db2e1768afa --- /dev/null +++ b/pkgs/development/python-modules/pytest-fixture-config/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pytest, coverage, virtualenv, pytestcov, six }: + +buildPythonPackage rec { + pname = "pytest-fixture-config"; + version = "1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1dpdf36hpkfhgmca4rwmf0vnzz7xqbiw479v11zp12pq4p5w2z3x"; + }; + + buildInputs = [ pytest ]; + propagatedBuildInputs = [ coverage virtualenv pytestcov six ]; + + checkPhase = '' + py.test -k "not test_yield_requires_config_doesnt_skip and not test_yield_requires_config_skips" + ''; + + meta = with stdenv.lib; { + description = "Simple configuration objects for Py.test fixtures. Allows you to skip tests when their required config variables aren’t set."; + homepage = https://github.com/manahl/pytest-plugins; + license = licenses.mit; + maintainers = with maintainers; [ ryansydnor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08c36236c63..9b8e13d0288 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1924,31 +1924,7 @@ in { pytest-django = callPackage ../development/python-modules/pytest-django { }; - pytest-fixture-config = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "pytest-fixture-config"; - version = "1.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/${pname}/${name}.tar.gz"; - sha256 = "7d7cc1cb25f88a707f083b1dc2e3c2fdfc6f37709567a2587dd0cd0bcd70edb6"; - }; - - buildInputs = with self; [ pytest ]; - propagatedBuildInputs = with self; [ coverage virtualenv pytestcov six ]; - - checkPhase = '' - py.test -k "not test_yield_requires_config_doesnt_skip and not test_yield_requires_config_skips" - ''; - - meta = { - description = "Simple configuration objects for Py.test fixtures. Allows you to skip tests when their required config variables aren’t set."; - homepage = https://github.com/manahl/pytest-plugins; - license = licenses.mit; - maintainers = with maintainers; [ ryansydnor ]; - platforms = platforms.all; - }; - }; + pytest-fixture-config = callPackage ../development/python-modules/pytest-fixture-config { }; pytest-forked = callPackage ../development/python-modules/pytest-forked { };