depot/third_party/nixpkgs/pkgs/development/python-modules/howdoi/default.nix
Default email b6d97fd731 Project import generated by Copybara.
GitOrigin-RevId: be0b453d7c7eee2090962c9a83749b024ff9acf5
2020-12-25 14:55:36 +01:00

43 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, six
, pygments
, pyquery
, cachelib
, appdirs
, keep
}:
buildPythonPackage rec {
pname = "howdoi";
version = "2.0.8";
src = fetchPypi {
inherit pname version;
sha256 = "9b7cabab87cd614e26b408653bc8937ec27b79ca2fde6b9457da55d2541f75fb";
};
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 ];
};
}