2021-06-28 23:13:55 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonApplication, aiohttp, python-dateutil, humanize, click, pytestCheckHook, tox }:
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildPythonApplication rec {
|
2020-12-03 08:41:04 +00:00
|
|
|
pname = "twtxt";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.3.1";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-06-28 23:13:55 +00:00
|
|
|
owner = "buckket";
|
2020-12-03 08:41:04 +00:00
|
|
|
repo = pname;
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-CbFh1o2Ijinfb8X+h1GP3Tp+8D0D3/Czt/Uatd1B4cw=";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# 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'
|
|
|
|
'';
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp python-dateutil humanize click ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook tox ];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Disable test using relative date and time
|
|
|
|
"test_tweet_relative_datetime"
|
|
|
|
];
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
meta = with lib; {
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Decentralised, minimalist microblogging service for hackers";
|
|
|
|
homepage = "https://github.com/buckket/twtxt";
|
2020-12-03 08:41:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
};
|
|
|
|
}
|