diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix new file mode 100644 index 000000000000..7476801794c3 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, colorama +, 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"; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" + ''; + + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + colorama + ]; + + 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 ]; + }; +} |