blob: d5ea27c9d50b948e9f6f253c87d1544c3c0c58ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{ lib, fetchFromGitHub, fetchPypi, python3 }:
let
py = python3.override {
packageOverrides = self: super: {
self = py;
# not compatible with prompt_toolkit >=2.0
prompt-toolkit = super.prompt-toolkit.overridePythonAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "1.0.18";
src = oldAttrs.src.override {
inherit version;
hash = "sha256-3U/KAsgGlJetkxotCZFMaw0bUBUc6Ha8Fb3kx0cJASY=";
};
});
# Use click 7
click = super.click.overridePythonAttrs (old: rec {
version = "7.1.2";
src = fetchPypi {
pname = "click";
inherit version;
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
};
disabledTests = [ "test_bytes_args" ];
});
};
};
in
with py.pkgs;
buildPythonApplication rec {
pname = "haxor-news";
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";
hash = "sha256-5v61b49ttwqPOvtoykJBBzwVSi7S8ARlakccMr12bbw=";
};
propagatedBuildInputs = [
click
colorama
requests
pygments
prompt-toolkit
six
];
# will fail without pre-seeded config files
doCheck = false;
nativeCheckInputs = [ unittestCheckHook mock ];
unittestFlagsArray = [ "-s" "tests" "-v" ];
meta = with lib; {
homepage = "https://github.com/donnemartin/haxor-news";
description = "Browse Hacker News like a haxor";
license = licenses.asl20;
maintainers = with maintainers; [ matthiasbeyer ];
};
}
|