2021-06-05 10:05:01 +02:00
|
|
|
{ lib, fetchFromGitHub, buildPythonApplication, aiohttp, python-dateutil, humanize, click, pytestCheckHook, tox }:
|
2020-11-30 20:50:56 +01:00
|
|
|
|
2021-06-05 10:05:01 +02:00
|
|
|
buildPythonApplication rec {
|
2020-11-30 20:50:56 +01:00
|
|
|
pname = "twtxt";
|
2021-06-05 10:05:01 +02:00
|
|
|
version = "1.2.3";
|
2020-11-30 20:50:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-06-05 10:05:01 +02:00
|
|
|
owner = "buckket";
|
2020-11-30 20:50:56 +01:00
|
|
|
repo = pname;
|
2021-06-05 10:05:01 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-AdM95G2Vz3UbVPI7fs8/D78BMxscbTGrCpIyyHzSmho=";
|
2020-11-30 20:50:56 +01:00
|
|
|
};
|
|
|
|
|
2021-06-05 10:05:01 +02: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-11-30 20:50:56 +01:00
|
|
|
|
2021-06-05 10:05:01 +02:00
|
|
|
propagatedBuildInputs = [ aiohttp python-dateutil humanize click ];
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook tox ];
|
2020-11-30 20:50:56 +01:00
|
|
|
|
2022-05-13 20:13:44 +02:00
|
|
|
disabledTests = [
|
|
|
|
# Disable test using relative date and time
|
|
|
|
"test_tweet_relative_datetime"
|
|
|
|
];
|
|
|
|
|
2020-11-30 20:50:56 +01:00
|
|
|
meta = with lib; {
|
2021-06-05 10:05:01 +02:00
|
|
|
description = "Decentralised, minimalist microblogging service for hackers";
|
|
|
|
homepage = "https://github.com/buckket/twtxt";
|
2020-11-30 20:50:56 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
};
|
|
|
|
}
|