about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/howdoi/default.nix
blob: 213c382be0bd8c834c4668f47796b9ded720bace (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
50
51
52
53
54
55
56
57
58
59
60
61
{ lib
, appdirs
, buildPythonPackage
, cachelib
, cssselect
, fetchFromGitHub
, keep
, lxml
, pygments
, pyquery
, requests
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "howdoi";
  version = "2.0.19";

  src = fetchFromGitHub {
    owner = "gleitz";
    repo = pname;
    rev = "v${version}";
    sha256 = "0hl7cpxm4llsgw6390bpjgkzrprrpb0vxx2flgly7wiy9zl1rc5q";
  };

  propagatedBuildInputs = [
    appdirs
    cachelib
    cssselect
    keep
    lxml
    pygments
    pyquery
    requests
  ];

  checkInputs = [
    pytestCheckHook
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  disabledTests = [
    # AssertionError: "The...
    "test_get_text_with_one_link"
    "test_get_text_without_links"
  ];

  pythonImportsCheck = [
    "howdoi"
  ];

  meta = with lib; {
    description = "Instant coding answers via the command line";
    homepage = "https://pypi.python.org/pypi/howdoi";
    license = licenses.mit;
    maintainers = with maintainers; [ costrouc ];
  };
}