@@ -0,0 +1,30 @@
1+{ lib, fetchFromGitHub, buildPythonApplication, pybluez }:
2+
3+buildPythonApplication rec {
4+ pname = "bluetooth_battery";
5+ version = "1.2.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "TheWeirdDev";
9+ repo = "Bluetooth_Headset_Battery_Level";
10+ rev = "v${version}";
11+ sha256 = "121pkaq9z8p2i35cqs32aygjvf82r961w0axirpmsrbmrwq2hh6g";
12+ };
13+
14+ propagatedBuildInputs = [ pybluez ];
15+
16+ format = "other";
17+
18+ installPhase = ''
19+ mkdir -p $out/bin
20+ cp $src/bluetooth_battery.py $out/bin/bluetooth_battery
21+ '';
22+
23+ meta = with lib; {
24+ description = "Fetch the battery charge level of some Bluetooth headsets";
25+ homepage = "https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level";
26+ license = licenses.gpl3Plus;
27+ platforms = platforms.unix;
28+ maintainers = with maintainers; [ cheriimoya ];
29+ };
30+}