lol
1{ lib, fetchFromGitHub, fetchpatch, python }:
2
3python.pkgs.buildPythonApplication rec {
4 pname = "brotab";
5 version = "1.4.2";
6 format = "setuptools";
7
8 src = fetchFromGitHub {
9 owner = "balta2ar";
10 repo = pname;
11 rev = version;
12 hash = "sha256-HKKjiW++FwjdorqquSCIdi1InE6KbMbFKZFYHBxzg8Q=";
13 };
14
15 patches = [
16 # https://github.com/balta2ar/brotab/pull/102
17 (fetchpatch {
18 name = "remove-unnecessary-pip-import.patch";
19 url = "https://github.com/balta2ar/brotab/commit/825cd48f255c911aabbfb495f6b8fc73f27d3fe5.patch";
20 hash = "sha256-IN28AOLPKPUc3KkxIGFMpZNNXA1+O12NxS+Hl4KMXbg=";
21 })
22 ];
23
24 propagatedBuildInputs = with python.pkgs; [
25 flask
26 psutil
27 requests
28 setuptools
29 ];
30
31 postPatch = ''
32 substituteInPlace requirements/base.txt \
33 --replace "Flask==2.0.2" "Flask>=2.0.2" \
34 --replace "psutil==5.8.0" "psutil>=5.8.0" \
35 --replace "requests==2.24.0" "requests>=2.24.0"
36 '';
37
38 __darwinAllowLocalNetworking = true;
39
40 nativeCheckInputs = with python.pkgs; [
41 pytestCheckHook
42 ];
43
44 meta = with lib; {
45 homepage = "https://github.com/balta2ar/brotab";
46 description = "Control your browser's tabs from the command line";
47 license = licenses.mit;
48 maintainers = with maintainers; [ doronbehar ];
49 };
50}