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

python310Packages.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.12.8a0";

  src = fetchFromGitHub {
    owner = "rndusr";
    repo = "stig";
    rev = "v${version}";
    sha256 = "sha256-vfmuA6DqWvAygcS6N+qX1h+Ag+P4eOwm41DhAFZR3r8=";
  };

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

  nativeCheckInputs = with python310Packages; [
    asynctest
    pytestCheckHook
  ];

  dontUseSetuptoolsCheck = true;

  preCheck = ''
    export LC_ALL=C
  '';

  disabledTestPaths = [
    # Almost all tests fail in this file, it is reported upstream in:
    # https://github.com/rndusr/stig/issues/214 , and upstream fails to
    # reproduce the issue unfortunately.
    "tests/client_test/aiotransmission_test/api_settings_test.py"
  ];
  disabledTests = [
    # Another failure with similar circumstances to the above
    "test_candidates_are_sorted_case_insensitively"
  ];

  passthru.tests = testers.testVersion {
    package = stig;
    command = "stig -v";
    version = "stig version ${version}";
  };

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