about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/p2p/stig/default.nix
blob: 98fd41e8bcd1f5694bf5244c9453248a3bdaa4e7 (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
{ lib
, fetchFromGitHub
, python3Packages
}:

python3Packages.buildPythonApplication rec {
  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
  version = "0.11.0a";

  src = fetchFromGitHub {
    owner = "rndusr";
    repo = "stig";
    rev = "v${version}";
    sha256 = "192v8f80jfly12bqzsslpxlvm72kdqm3jl40x1az5czpg4ab3lb7";
  };

  # 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"
  '';

  propagatedBuildInputs = with python3Packages; [
    urwid
    urwidtrees
    aiohttp
    async-timeout
    pyxdg
    blinker
    natsort
    setproctitle
  ];

  checkInputs = with python3Packages; [
    asynctest
    pytestCheckHook
  ];

  dontUseSetuptoolsCheck = true;

  preCheck = ''
    export LC_ALL=C
  '';

  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"
    # TestScrollBarWithScrollable.test_wrapping_bug fails
    "--deselect=tests/tui_test/scroll_test.py::TestScrollBarWithScrollable::test_wrapping_bug"
  ];

  meta = with lib; {
    description = "TUI and CLI for the BitTorrent client Transmission";
    homepage = "https://github.com/rndusr/stig";
    license = licenses.gpl3;
    maintainers = with maintainers; [ doronbehar ];
  };
}