about summary refs log tree commit diff
path: root/pkgs/applications/networking/twtxt/default.nix
blob: 5745408625620f24c635b5daf910a3667fc177b1 (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
{ lib, fetchFromGitHub, buildPythonApplication, aiohttp, python-dateutil, humanize, click, pytestCheckHook, tox }:

buildPythonApplication rec {
  pname = "twtxt";
  version = "1.3.1";

  src = fetchFromGitHub {
    owner = "buckket";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-CbFh1o2Ijinfb8X+h1GP3Tp+8D0D3/Czt/Uatd1B4cw=";
  };

  # Relax some dependencies
  postPatch = ''
    substituteInPlace setup.py \
      --replace 'aiohttp>=2.2.5,<3' 'aiohttp' \
      --replace 'click>=6.7,<7' 'click' \
      --replace 'humanize>=0.5.1,<1' 'humanize'
  '';

  propagatedBuildInputs = [ aiohttp python-dateutil humanize click ];

  checkInputs = [ pytestCheckHook tox ];

  disabledTests = [
     # Disable test using relative date and time
     "test_tweet_relative_datetime"
  ];

  meta = with lib; {
    description = "Decentralised, minimalist microblogging service for hackers";
    homepage = "https://github.com/buckket/twtxt";
    license = licenses.mit;
    maintainers = with maintainers; [ siraben ];
  };
}