about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/brotab/default.nix
blob: 854958dc8a3b25bce74d1d814bdc0f38e239d74c (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
{ lib, fetchFromGitHub, glibcLocales, python }:

python.pkgs.buildPythonApplication rec {
  version = "1.2.2";
  pname = "brotab";

  src = fetchFromGitHub {
    owner = "balta2ar";
    repo = pname;
    rev = version;
    sha256 = "1c6npyws705qf9rv70mmh7d0almmpxz87a0n65lhw08lms1h3dl2";
  };

  propagatedBuildInputs = with python.pkgs; [
    requests
    flask
    psutil
    setuptools
  ];

  checkBuildInputs = with python.pkgs; [
    pytest
  ];

  # test_integration.py requires Chrome browser session
  checkPhase = ''
    ${python.interpreter} -m unittest brotab/tests/test_{brotab,utils}.py
  '';

  meta = with lib; {
    homepage = "https://github.com/balta2ar/brotab";
    description = "Control your browser's tabs from the command line";
    license = licenses.mit;
    maintainers = with maintainers; [ doronbehar ];
  };
}