1{ lib
2, buildPythonPackage
3, fetchPypi
4, six
5, pygments
6, pyquery
7, cachelib
8, appdirs
9, keep
10}:
11
12buildPythonPackage rec {
13 pname = "howdoi";
14 version = "2.0.5";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "8e4d048ae7ca6182d648f62a66d07360cca2504fe46649c32748b6ef2735f7f4";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py --replace 'cachelib==0.1' 'cachelib'
23 '';
24
25 propagatedBuildInputs = [ six pygments pyquery cachelib appdirs keep ];
26
27 # author hasn't included page_cache directory (which allows tests to run without
28 # external requests) in pypi tarball. github repo doesn't have release revisions
29 # clearly tagged. re-enable tests when either is sorted.
30 doCheck = false;
31 preCheck = ''
32 mv howdoi _howdoi
33 export HOME=$(mktemp -d)
34 '';
35 pythonImportsCheck = [ "howdoi" ];
36
37 meta = with lib; {
38 description = "Instant coding answers via the command line";
39 homepage = "https://pypi.python.org/pypi/howdoi";
40 license = licenses.mit;
41 maintainers = [ maintainers.costrouc ];
42 };
43}