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-02-05 18:43:10 +00:00
|
|
|
version = "2.0.10";
|
2018-04-03 13:08:17 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 18:43:10 +00:00
|
|
|
sha256 = "e561e3c5d4f39ab1f86e9f24bb0b2803ee6e312de61e90907f739aa638f35215";
|
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
|
|
|
};
|
|
|
|
}
|