git.iko.soy/typeable/nixpkgs
on master help sign in
bluetooth_battery: init at 1.2.0
commit52d6ab3013061a4189a3d01aaccac9ed1c0f93bb authorMax Hausch <cheriimoya@googlemail.com> dateTue 19 Jan 2021, 08:57 (6 years ago) parentf4e5080
2 files changed+32
pkgs/applications/misc/bluetooth_battery/default.nix+30 pkgs/top-level/all-packages.nix+2
pkgs/applications/misc/bluetooth_battery/default.nixnew file+30
@@ -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+}
pkgs/top-level/all-packages.nix+2
@@ -3217,6 +3217,8 @@ in
32173217
32183218 biosdevname = callPackage ../tools/networking/biosdevname { };
32193219
3220+ bluetooth_battery = python3Packages.callPackage ../applications/misc/bluetooth_battery { };
3221+
32203222 code-browser-qt = libsForQt5.callPackage ../applications/editors/code-browser { withQt = true;
32213223 };
32223224 code-browser-gtk = callPackage ../applications/editors/code-browser { withGtk = true;