nixpkgs/pkgs/development/python-modules/howdoi/default.nix

44 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, six
, pygments
, pyquery
, cachelib
, appdirs
, keep
}:
buildPythonPackage rec {
pname = "howdoi";
2020-08-29 12:41:49 +01:00
version = "2.0.5";
src = fetchPypi {
inherit pname version;
2020-08-29 12:41:49 +01:00
sha256 = "8e4d048ae7ca6182d648f62a66d07360cca2504fe46649c32748b6ef2735f7f4";
};
postPatch = ''
substituteInPlace setup.py --replace 'cachelib==0.1' 'cachelib'
'';
propagatedBuildInputs = [ six pygments pyquery cachelib appdirs keep ];
# 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;
preCheck = ''
mv howdoi _howdoi
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "howdoi" ];
meta = with lib; {
description = "Instant coding answers via the command line";
homepage = "https://pypi.python.org/pypi/howdoi";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}