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";
|
2020-08-29 12:41:49 +01:00
|
|
|
version = "2.0.5";
|
2018-04-03 13:08:17 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-29 12:41:49 +01:00
|
|
|
sha256 = "8e4d048ae7ca6182d648f62a66d07360cca2504fe46649c32748b6ef2735f7f4";
|
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
|
|
|
};
|
|
|
|
}
|