nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3Packages,
5 nixosTests,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "toot";
10 version = "0.51.0";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "ihabunek";
15 repo = "toot";
16 tag = version;
17 hash = "sha256-A3ValIMDPcfrvOdOJIkeurT+fAj1TzGf6cy12yaaBQE=";
18 };
19
20 nativeCheckInputs = with python3Packages; [ pytest ];
21
22 build-system = with python3Packages; [
23 setuptools
24 setuptools-scm
25 ];
26
27 dependencies = with python3Packages; [
28 python-dateutil
29 requests
30 beautifulsoup4
31 wcwidth
32 urwid
33 tomlkit
34 click
35 pillow
36 term-image
37 ];
38
39 checkPhase = ''
40 runHook preCheck
41 py.test
42 runHook postCheck
43 '';
44
45 passthru.tests.toot = nixosTests.pleroma;
46
47 meta = {
48 description = "Mastodon CLI interface";
49 mainProgram = "toot";
50 homepage = "https://github.com/ihabunek/toot";
51 changelog = "https://github.com/ihabunek/toot/blob/refs/tags/${version}/CHANGELOG.md";
52 license = lib.licenses.gpl3Only;
53 maintainers = with lib.maintainers; [
54 matthiasbeyer
55 aleksana
56 ];
57 };
58}