about summary refs log tree commit diff
path: root/pkgs/by-name/sm/smassh/package.nix
blob: 7ad74634137325d042cd708c30a98ee0d8c14e28 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, fetchFromGitHub
, smassh
, python3
, testers
}:

python3.pkgs.buildPythonApplication rec {
  pname = "smassh";
  version = "3.1.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "kraanzu";
    repo = "smassh";
    rev = "v${version}";
    hash = "sha256-QE7TFf/5hdd2W2EsVbn3gV/FundhJNxHqv0JWV5dYDc=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "textual"
  ];

  propagatedBuildInputs = with python3.pkgs; [
    textual
    appdirs
    click
    requests
  ];

  # No tests available
  doCheck = false;

  passthru.tests.version = testers.testVersion {
    package = smassh;
    command = "HOME=$(mktemp -d) smassh --version";
  };

  meta = with lib; {
    description = "A TUI based typing test application inspired by MonkeyType";
    homepage = "https://github.com/kraanzu/smassh";
    changelog = "https://github.com/kraanzu/smassh/blob/main/CHANGELOG.md";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ aimpizza ];
    mainProgram = "smassh";
  };
}