2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-08-18 13:19:15 +00:00
|
|
|
, appdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cachelib
|
2023-07-15 17:15:38 +00:00
|
|
|
, colorama
|
2021-08-18 13:19:15 +00:00
|
|
|
, cssselect
|
|
|
|
, fetchFromGitHub
|
2020-09-25 04:45:31 +00:00
|
|
|
, keep
|
2021-08-18 13:19:15 +00:00
|
|
|
, lxml
|
|
|
|
, pygments
|
|
|
|
, pyquery
|
|
|
|
, requests
|
2023-07-15 17:15:38 +00:00
|
|
|
, rich
|
2021-08-18 13:19:15 +00:00
|
|
|
, pytestCheckHook
|
2022-05-18 14:49:53 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "howdoi";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.0.20";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gleitz";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-u0k+h7Sp2t/JUnfPqRzDpEA+vNXB7CpyZ/SRvk+B9t0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
cachelib
|
2023-07-15 17:15:38 +00:00
|
|
|
colorama
|
2021-08-18 13:19:15 +00:00
|
|
|
cssselect
|
|
|
|
keep
|
|
|
|
lxml
|
|
|
|
pygments
|
|
|
|
pyquery
|
|
|
|
requests
|
2023-07-15 17:15:38 +00:00
|
|
|
rich
|
2021-08-18 13:19:15 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-18 13:19:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_colorize"
|
2021-08-18 13:19:15 +00:00
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"howdoi"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
changelog = "https://github.com/gleitz/howdoi/blob/v${version}/CHANGES.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Instant coding answers via the command line";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/gleitz/howdoi";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-08-18 13:19:15 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|