1{ stdenv, python3Packages, fetchFromGitHub }:
2
3with python3Packages;
4
5buildPythonApplication rec {
6 version = "2017-01-19";
7 pname = "bonfire";
8 name = "${pname}-unstable-${version}";
9
10 # use latest git version with --endpoint flag
11 # https://github.com/blue-yonder/bonfire/pull/18
12 src = fetchFromGitHub {
13 owner = "blue-yonder";
14 repo = "${pname}";
15 rev = "d0af9ca10394f366cfa3c60f0741f1f0918011c2";
16 sha256 = "193zcvzbhxwwkwbgmnlihhhazwkajycxf4r71jz1m12w301sjhq5";
17 };
18
19 postPatch = ''
20 # https://github.com/blue-yonder/bonfire/pull/24
21 substituteInPlace requirements.txt \
22 --replace "arrow>=0.5.4,<0.8" "arrow>=0.5.4" \
23 --replace "keyring>=9,<10" "keyring>=9"
24 # pip fails when encountering the git hash for the package version
25 substituteInPlace setup.py \
26 --replace "version=version," "version='${version}',"
27 # remove extraneous files
28 substituteInPlace setup.cfg \
29 --replace "data_files = *.rst, *.txt" ""
30 '';
31
32 buildInputs = [ httpretty pytest pytestcov ];
33
34 propagatedBuildInputs = [ arrow click keyring parsedatetime requests six termcolor ];
35
36 meta = with stdenv.lib; {
37 homepage = https://pypi.python.org/pypi/bonfire;
38 description = "CLI Graylog Client with Follow Mode";
39 license = licenses.bsd3;
40 maintainers = [ maintainers.womfoo ];
41 platforms = platforms.linux;
42 };
43
44}