Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth_battery: init at 1.2.0 #103023

Merged
merged 2 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,12 @@
githubId = 33503784;
name = "Yucheng Zhang";
};
cheriimoya = {
cheriimoya marked this conversation as resolved.
Show resolved Hide resolved
email = "[email protected]";
github = "cheriimoya";
githubId = 28303440;
name = "Max Hausch";
};
chessai = {
email = "[email protected]";
github = "chessai";
Expand Down
30 changes: 30 additions & 0 deletions pkgs/applications/misc/bluetooth_battery/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down