2021-01-19 07:57:04 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonApplication, pybluez }:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "bluetooth_battery";
|
2021-11-14 00:04:21 +00:00
|
|
|
version = "1.3.1";
|
2021-01-19 07:57:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TheWeirdDev";
|
|
|
|
repo = "Bluetooth_Headset_Battery_Level";
|
|
|
|
rev = "v${version}";
|
2021-11-14 00:04:21 +00:00
|
|
|
sha256 = "067qfxh228cy1x95bnjp88dx4k00ajj7ay7fz5vr1gkj2yfa203s";
|
2021-01-19 07:57:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|