From 052c103725383309b0199b4fcc01a60f27837119 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 8 Jan 2020 14:11:26 +0200 Subject: [PATCH 1/2] brotab: init at 1.1.0 --- pkgs/tools/misc/brotab/default.nix | 29 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/misc/brotab/default.nix diff --git a/pkgs/tools/misc/brotab/default.nix b/pkgs/tools/misc/brotab/default.nix new file mode 100644 index 00000000000..b109c0ad50c --- /dev/null +++ b/pkgs/tools/misc/brotab/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchFromGitHub, glibcLocales, python }: + +python.pkgs.buildPythonApplication rec { + version = "1.1.0"; + pname = "brotab"; + + src = fetchFromGitHub { + owner = "balta2ar"; + repo = pname; + rev = version; + sha256 = "17yj5i8p28a7zmixdfa1i4gfc7c2fmdkxlymazasar58dz8m68mw"; + }; + + propagatedBuildInputs = with python.pkgs; [ + requests + flask + requests + pytest + psutil + ]; + + 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 ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18132524fba..e720883a236 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18324,6 +18324,10 @@ in browsh = callPackage ../applications/networking/browsers/browsh { }; + brotab = callPackage ../tools/misc/brotab { + python = python3; + }; + bookworm = callPackage ../applications/office/bookworm { }; chromium = callPackage ../applications/networking/browsers/chromium (config.chromium or {}); From d9935b1f717a440d810265396675c0474153d062 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 9 Jan 2020 17:29:59 +0200 Subject: [PATCH 2/2] Add checkPhase Co-Authored-By: Jon --- pkgs/tools/misc/brotab/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/brotab/default.nix b/pkgs/tools/misc/brotab/default.nix index b109c0ad50c..2b6274c631d 100644 --- a/pkgs/tools/misc/brotab/default.nix +++ b/pkgs/tools/misc/brotab/default.nix @@ -19,6 +19,11 @@ python.pkgs.buildPythonApplication rec { psutil ]; + # 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"; @@ -26,4 +31,3 @@ python.pkgs.buildPythonApplication rec { maintainers = with maintainers; [ doronbehar ]; }; } -