depot/third_party/nixpkgs/pkgs/development/python-modules/howdoi/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

65 lines
1.1 KiB
Nix

{
stdenv,
lib,
appdirs,
buildPythonPackage,
cachelib,
colorama,
cssselect,
fetchFromGitHub,
keep,
lxml,
pygments,
pyquery,
requests,
rich,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "howdoi";
version = "2.0.20";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "gleitz";
repo = pname;
rev = "v${version}";
hash = "sha256-u0k+h7Sp2t/JUnfPqRzDpEA+vNXB7CpyZ/SRvk+B9t0=";
};
propagatedBuildInputs = [
appdirs
cachelib
colorama
cssselect
keep
lxml
pygments
pyquery
requests
rich
];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export HOME=$(mktemp -d)
'';
disabledTests = [ "test_colorize" ];
pythonImportsCheck = [ "howdoi" ];
meta = with lib; {
broken = stdenv.isDarwin;
changelog = "https://github.com/gleitz/howdoi/blob/v${version}/CHANGES.txt";
description = "Instant coding answers via the command line";
homepage = "https://github.com/gleitz/howdoi";
license = licenses.mit;
maintainers = [ ];
};
}