1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 colorama,
7 pytest,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pytest-resource-path";
13 version = "1.3.0";
14 format = "setuptools";
15 disabled = pythonOlder "3.5";
16
17 src = fetchFromGitHub {
18 owner = "yukihiko-shinoda";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "1siv3pk4fsabz254fdzr7c0pxy124habnbw4ym66pfk883fr96g2";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.cfg \
26 --replace "pytest-runner" ""
27 '';
28
29 buildInputs = [ pytest ];
30
31 propagatedBuildInputs = [ colorama ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "pytest_resource_path" ];
36
37 meta = with lib; {
38 description = "Pytest plugin to provide path for uniform access to test resources";
39 homepage = "https://github.com/yukihiko-shinoda/pytest-resource-path";
40 license = licenses.mit;
41 maintainers = with maintainers; [ fab ];
42 };
43}