2017-09-26 15:38:06 +00:00
|
|
|
{ stdenv, python3Packages, fetchFromGitHub }:
|
|
|
|
|
|
|
|
with python3Packages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "bonfire";
|
2019-12-22 18:37:16 +00:00
|
|
|
version = "unstable-2017-01-19";
|
2017-09-26 15:38:06 +00:00
|
|
|
|
|
|
|
# use latest git version with --endpoint flag
|
|
|
|
# https://github.com/blue-yonder/bonfire/pull/18
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "blue-yonder";
|
2019-09-08 23:38:31 +00:00
|
|
|
repo = pname;
|
2017-09-26 15:38:06 +00:00
|
|
|
rev = "d0af9ca10394f366cfa3c60f0741f1f0918011c2";
|
|
|
|
sha256 = "193zcvzbhxwwkwbgmnlihhhazwkajycxf4r71jz1m12w301sjhq5";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/blue-yonder/bonfire/pull/24
|
|
|
|
substituteInPlace requirements.txt \
|
2018-04-06 11:06:04 +00:00
|
|
|
--replace "arrow>=0.5.4,<0.8" "arrow>=0.5.4" \
|
2019-01-10 01:36:09 +00:00
|
|
|
--replace "keyring>=9,<10" "keyring>=9" \
|
|
|
|
--replace "click>=3.3,<7" "click>=3.3"
|
2017-09-26 15:38:06 +00:00
|
|
|
# pip fails when encountering the git hash for the package version
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version=version," "version='${version}',"
|
2019-12-22 18:37:16 +00:00
|
|
|
# remove extraneous files
|
2017-09-26 15:38:06 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "data_files = *.rst, *.txt" ""
|
|
|
|
'';
|
|
|
|
|
2019-07-13 09:25:00 +00:00
|
|
|
buildInputs = [ httpretty pytest pytestcov ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# fix compatibility with pytest 4
|
|
|
|
substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
|
|
|
|
'';
|
2017-09-26 15:38:06 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ arrow click keyring parsedatetime requests six termcolor ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/bonfire";
|
2017-09-26 15:38:06 +00:00
|
|
|
description = "CLI Graylog Client with Follow Mode";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.womfoo ];
|
|
|
|
platforms = platforms.linux;
|
2019-12-22 18:37:16 +00:00
|
|
|
broken = true; # no longer compatible with new arrow package
|
2017-09-26 15:38:06 +00:00
|
|
|
};
|
|
|
|
}
|