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