From 1b01e363b6e4f41d5bf299bd9457d0a2fcef6615 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 4 Aug 2021 21:16:51 +0200 Subject: [PATCH] python3Packages.pytest-resource-path: init at 1.3.0 --- .../pytest-resource-path/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-resource-path/default.nix diff --git a/pkgs/development/python-modules/pytest-resource-path/default.nix b/pkgs/development/python-modules/pytest-resource-path/default.nix new file mode 100644 index 00000000000..a0517ee20aa --- /dev/null +++ b/pkgs/development/python-modules/pytest-resource-path/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, colorama +, pytest-runner +, pytest +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pytest-resource-path"; + version = "1.3.0"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "yukihiko-shinoda"; + repo = pname; + rev = "v${version}"; + sha256 = "1siv3pk4fsabz254fdzr7c0pxy124habnbw4ym66pfk883fr96g2"; + }; + + nativeBuildInputs = [ + pytest-runner + ]; + + propagatedBuildInputs = [ + colorama + pytest + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pytest_resource_path" + ]; + + meta = with lib; { + description = "Pytest plugin to provide path for uniform access to test resources"; + homepage = "https://github.com/yukihiko-shinoda/pytest-resource-path"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 76b13720dde..052f17c6db6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6909,6 +6909,8 @@ in { pytest-rerunfailures = callPackage ../development/python-modules/pytest-rerunfailures { }; + pytest-resource-path = callPackage ../development/python-modules/pytest-resource-path { }; + pytest-runner = callPackage ../development/python-modules/pytest-runner { }; pytest-sanic = callPackage ../development/python-modules/pytest-sanic {