From 52d6ab3013061a4189a3d01aaccac9ed1c0f93bb Mon Sep 17 00:00:00 2001 From: Max Hausch Date: Tue, 19 Jan 2021 08:57:04 +0100 Subject: [PATCH] bluetooth_battery: init at 1.2.0 --- .../misc/bluetooth_battery/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/applications/misc/bluetooth_battery/default.nix diff --git a/pkgs/applications/misc/bluetooth_battery/default.nix b/pkgs/applications/misc/bluetooth_battery/default.nix new file mode 100644 index 000000000000..19c2f3b99a4d --- /dev/null +++ b/pkgs/applications/misc/bluetooth_battery/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchFromGitHub, buildPythonApplication, pybluez }: + +buildPythonApplication rec { + pname = "bluetooth_battery"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "TheWeirdDev"; + repo = "Bluetooth_Headset_Battery_Level"; + rev = "v${version}"; + sha256 = "121pkaq9z8p2i35cqs32aygjvf82r961w0axirpmsrbmrwq2hh6g"; + }; + + propagatedBuildInputs = [ pybluez ]; + + format = "other"; + + installPhase = '' + mkdir -p $out/bin + cp $src/bluetooth_battery.py $out/bin/bluetooth_battery + ''; + + meta = with lib; { + description = "Fetch the battery charge level of some Bluetooth headsets"; + homepage = "https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ cheriimoya ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 393bb16da568..4397c4b58d9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3217,6 +3217,8 @@ in biosdevname = callPackage ../tools/networking/biosdevname { }; + bluetooth_battery = python3Packages.callPackage ../applications/misc/bluetooth_battery { }; + code-browser-qt = libsForQt5.callPackage ../applications/editors/code-browser { withQt = true; }; code-browser-gtk = callPackage ../applications/editors/code-browser { withGtk = true;