2019-02-24 17:49:39 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, pygments
|
|
|
|
, pyquery
|
2020-04-19 20:39:37 +01:00
|
|
|
, cachelib
|
|
|
|
, appdirs
|
2020-08-31 15:05:07 +01:00
|
|
|
, keep
|
2019-02-24 17:49:39 +00:00
|
|
|
}:
|
2018-04-03 13:08:17 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "howdoi";
|
2021-06-18 22:47:21 +01:00
|
|
|
version = "2.0.16";
|
2018-04-03 13:08:17 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 22:47:21 +01:00
|
|
|
sha256 = "0257fbb328eb3a15ed3acc498314902f00908b130209073509eec21cb7235b2b";
|
2018-04-03 13:08:17 +01:00
|
|
|
};
|
|
|
|
|
2020-08-31 15:05:07 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace 'cachelib==0.1' 'cachelib'
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six pygments pyquery cachelib appdirs keep ];
|
2018-04-03 13:08:17 +01:00
|
|
|
|
2020-08-31 15:05:07 +01:00
|
|
|
# author hasn't included page_cache directory (which allows tests to run without
|
|
|
|
# external requests) in pypi tarball. github repo doesn't have release revisions
|
|
|
|
# clearly tagged. re-enable tests when either is sorted.
|
|
|
|
doCheck = false;
|
2019-02-24 17:49:39 +00:00
|
|
|
preCheck = ''
|
2020-08-31 15:05:07 +01:00
|
|
|
mv howdoi _howdoi
|
2019-02-24 17:49:39 +00:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-08-31 15:05:07 +01:00
|
|
|
pythonImportsCheck = [ "howdoi" ];
|
2019-02-24 17:49:39 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2018-04-03 13:08:17 +01:00
|
|
|
description = "Instant coding answers via the command line";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pypi.python.org/pypi/howdoi";
|
2018-04-03 13:08:17 +01:00
|
|
|
license = licenses.mit;
|
2019-02-24 17:49:39 +00:00
|
|
|
maintainers = [ maintainers.costrouc ];
|
2018-04-03 13:08:17 +01:00
|
|
|
};
|
|
|
|
}
|