about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-resource-path/default.nix
blob: f82e5a661e41d6044a6c061834c997781eca8cea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
  ];

  nativeCheckInputs = [
    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 ];
  };
}