about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-click/default.nix
blob: e271373b73ef0e22c169e2ee82e9f183539b2110 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, click
, pytestcov
, isPy27
, mock
}:

buildPythonPackage rec {
  pname = "pytest-click";
  version = "0.3";

  src = fetchFromGitHub {
    owner = "Stranger6667";
    repo = "pytest-click";
    rev = version;
    sha256 = "1cd15anw8d4rq6qs03j6ag38199rqw7vp0w0w0fm41mvdzr0lwvz";
  };

  postConfigure = ''
    substituteInPlace setup.py \
      --replace "mock==1.0.1" "mock"
  '';

  propagatedBuildInputs = [
    pytest
    click
  ];

  checkInputs = [ pytestcov ] ++ lib.optionals isPy27 [ mock ];

  meta = with lib; {
    description = "pytest plugin for click";
    homepage = "https://github.com/Stranger6667/pytest-click";
    license = licenses.mit;
    maintainers = [ maintainers.costrouc ];
  };
}