anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / misc / bluetooth_battery / default.nix
blob4158cdf8cc5595e35ba26f8ab5d9c10eadad4aec
1 { lib, fetchFromGitHub, buildPythonApplication, pybluez }:
3 buildPythonApplication rec {
4   pname = "bluetooth_battery";
5   version = "1.3.1";
7   src = fetchFromGitHub {
8     owner = "TheWeirdDev";
9     repo = "Bluetooth_Headset_Battery_Level";
10     rev = "v${version}";
11     sha256 = "067qfxh228cy1x95bnjp88dx4k00ajj7ay7fz5vr1gkj2yfa203s";
12   };
14   propagatedBuildInputs = [ pybluez ];
16   format = "other";
18   installPhase = ''
19     mkdir -p $out/bin
20     cp $src/bluetooth_battery.py $out/bin/bluetooth_battery
21   '';
23   meta = with lib; {
24     description = "Fetch the battery charge level of some Bluetooth headsets";
25     mainProgram = "bluetooth_battery";
26     homepage = "https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level";
27     license = licenses.gpl3Plus;
28     platforms = platforms.unix;
29     maintainers = with maintainers; [ cheriimoya ];
30   };