nixpkgs/pkgs/applications/networking/p2p/stig/default.nix

69 lines
2 KiB
Nix
Raw Normal View History

{ lib, stdenv
2019-08-25 16:42:41 +02:00
, fetchFromGitHub
2020-04-24 05:55:05 +02:00
, python3Packages
2019-08-25 16:42:41 +02:00
}:
2020-04-24 05:55:05 +02:00
python3Packages.buildPythonApplication rec {
2019-08-25 16:42:41 +02:00
pname = "stig";
# This project has a different concept for pre release / alpha,
# Read the project's README for details: https://github.com/rndusr/stig#stig
2020-07-11 05:22:42 +02:00
version = "0.11.2a0";
2019-08-25 16:42:41 +02:00
src = fetchFromGitHub {
owner = "rndusr";
repo = "stig";
rev = "v${version}";
2020-07-11 05:22:42 +02:00
sha256 = "05dn6mr86ly65gdqarl16a2jk1bwiw5xa6r4kyag3s6lqsv66iw8";
2019-08-25 16:42:41 +02:00
};
# urwidtrees 1.0.3 is requested by the developer because 1.0.2 (which is packaged
# in nixpkgs) is not uploaded to pypi and 1.0.1 has a problematic `setup.py`.
# As long as we don't have any problems installing it, no special features / specific bugs
# were fixed in 1.0.3 that aren't available in 1.0.2 are used by stig.
# See https://github.com/rndusr/stig/issues/120
postPatch = ''
substituteInPlace setup.py \
--replace "urwidtrees>=1.0.3dev0" "urwidtrees"
'';
2020-04-24 05:55:05 +02:00
propagatedBuildInputs = with python3Packages; [
2019-08-25 16:42:41 +02:00
urwid
urwidtrees
aiohttp
async-timeout
pyxdg
blinker
natsort
setproctitle
];
2020-04-24 05:55:05 +02:00
checkInputs = with python3Packages; [
2019-08-25 16:42:41 +02:00
asynctest
2020-04-24 05:55:05 +02:00
pytestCheckHook
2019-08-25 16:42:41 +02:00
];
2020-04-24 05:55:05 +02:00
dontUseSetuptoolsCheck = true;
preCheck = ''
export LC_ALL=C
2019-08-25 16:42:41 +02:00
'';
2020-04-24 05:55:05 +02:00
pytestFlagsArray = [
"tests"
# test_string__month_day_hour_minute_second fails on darwin
"--deselect=tests/client_test/ttypes_test.py::TestTimestamp::test_string__month_day_hour_minute_second"
2020-06-05 20:01:27 +02:00
# TestScrollBarWithScrollable.test_wrapping_bug fails
"--deselect=tests/tui_test/scroll_test.py::TestScrollBarWithScrollable::test_wrapping_bug"
2021-01-15 14:21:58 +01:00
] ++ lib.optionals stdenv.isDarwin [
2020-12-08 02:54:38 +01:00
"--deselect=tests/client_test/aiotransmission_test/api_torrent_test.py"
"--deselect=tests/client_test/aiotransmission_test/rpc_test.py"
2020-04-24 05:55:05 +02:00
];
meta = with lib; {
2019-08-25 16:42:41 +02:00
description = "TUI and CLI for the BitTorrent client Transmission";
homepage = "https://github.com/rndusr/stig";
license = licenses.gpl3;
maintainers = with maintainers; [ doronbehar ];
};
}