2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, python3, fetchpatch }:
|
2020-11-01 20:28:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
self = py;
|
|
|
|
|
|
|
|
# not compatible with prompt_toolkit >=2.0
|
2021-07-22 15:02:31 +00:00
|
|
|
prompt-toolkit = super.prompt-toolkit.overridePythonAttrs (oldAttrs: rec {
|
2020-11-01 20:28:56 +00:00
|
|
|
name = "${oldAttrs.pname}-${version}";
|
|
|
|
version = "1.0.18";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "09h1153wgr5x2ny7ds0w2m81n3bb9j8hjb8sjfnrg506r01clkyx";
|
|
|
|
};
|
|
|
|
});
|
2022-01-16 06:34:26 +00:00
|
|
|
# Use click 7
|
2022-06-06 18:41:55 +00:00
|
|
|
click = super.click.overridePythonAttrs (old: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
|
|
|
|
};
|
|
|
|
});
|
2020-11-01 20:28:56 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
2016-04-22 10:19:18 +00:00
|
|
|
|
2017-12-31 12:55:27 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "haxor-news";
|
2020-11-01 20:28:56 +00:00
|
|
|
version = "unstable-2020-10-20";
|
|
|
|
|
|
|
|
# haven't done a stable release in 3+ years, but actively developed
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "donnemartin";
|
|
|
|
repo = pname;
|
|
|
|
rev = "811a5804c09406465b2b02eab638c08bf5c4fa7f";
|
|
|
|
sha256 = "1g3dfsyk4727d9jh9w6j5r51ag07851cls7v7a7hmdvdixpvbzp6";
|
2019-02-03 15:25:17 +00:00
|
|
|
};
|
|
|
|
|
2017-12-31 12:55:27 +00:00
|
|
|
propagatedBuildInputs = [
|
2016-04-22 10:19:18 +00:00
|
|
|
click
|
|
|
|
colorama
|
2017-05-07 10:55:45 +00:00
|
|
|
requests
|
2016-04-22 10:19:18 +00:00
|
|
|
pygments
|
2021-07-22 15:02:31 +00:00
|
|
|
prompt-toolkit
|
2016-04-22 10:19:18 +00:00
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2020-11-01 20:28:56 +00:00
|
|
|
# will fail without pre-seeded config files
|
2018-02-21 12:28:15 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-08-06 16:32:04 +00:00
|
|
|
checkInputs = [ unittestCheckHook mock ];
|
2017-12-31 12:55:27 +00:00
|
|
|
|
2022-08-06 16:32:04 +00:00
|
|
|
unittestFlagsArray = [ "-s" "tests" "-v" ];
|
2017-12-31 12:55:27 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/donnemartin/haxor-news";
|
2016-04-22 10:19:18 +00:00
|
|
|
description = "Browse Hacker News like a haxor";
|
|
|
|
license = licenses.asl20;
|
2019-02-20 18:52:48 +00:00
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
2016-04-22 10:19:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|