about summary refs log tree commit diff
path: root/pkgs/applications/networking/twtxt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/twtxt/default.nix')
-rw-r--r--pkgs/applications/networking/twtxt/default.nix36
1 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/applications/networking/twtxt/default.nix b/pkgs/applications/networking/twtxt/default.nix
index eb216b1df8612..bee27ef2a7436 100644
--- a/pkgs/applications/networking/twtxt/default.nix
+++ b/pkgs/applications/networking/twtxt/default.nix
@@ -1,36 +1,44 @@
-{ lib, fetchFromGitHub, buildPythonApplication, aiohttp, python-dateutil, humanize, click, pytestCheckHook, tox }:
+{
+  lib,
+  fetchFromGitHub,
+  python3,
+}:
 
-buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "twtxt";
   version = "1.3.1";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "buckket";
-    repo = pname;
+    repo = "twtxt";
     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'
-  '';
+  build-system = with python3.pkgs; [ setuptools ];
 
-  propagatedBuildInputs = [ aiohttp python-dateutil humanize click ];
+  dependencies = with python3.pkgs; [
+    aiohttp
+    click
+    humanize
+    python-dateutil
+    setuptools
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
 
-  nativeCheckInputs = [ pytestCheckHook tox ];
+  pythonImportsCheck = [ "twtxt" ];
 
   disabledTests = [
-     # Disable test using relative date and time
-     "test_tweet_relative_datetime"
+    # 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";
+    changelog = "https://github.com/buckket/twtxt/releases/tag/v${version}";
     license = licenses.mit;
     maintainers = with maintainers; [ siraben ];
     mainProgram = "twtxt";