9 buildPythonPackage rec {
12 disabled = pythonOlder "3.6";
14 src = fetchFromGitHub {
17 # Latest commit that fixes using the library against python 3.9 by renaming
18 # isAlive() to is_alive(). The former function was removed in python 3.9.
19 rev = "e2dca1f8dcfa12e009952a882c0674a545d193d6";
20 sha256 = "07Jr7RSjqI8j0tT0MNAjrN1sjF1+mI+V0vtKInvtxj8=";
24 # The pijuice_cli.cli file doesn't have a shebang as the first line of the
25 # script. Without it, the pythonWrapPrograms hook will not wrap the program.
26 # Add a python shebang here so that the the hook is triggered.
30 PIJUICE_BUILD_BASE = 1;
31 PIJUICE_VERSION = version;
37 propagatedBuildInputs = [ smbus-cffi urwid ];
39 # Remove the following files from the package:
41 # pijuice_cli - A precompiled ELF binary that is a setuid wrapper for calling
44 # pijuiceboot - a precompiled ELF binary for flashing firmware. Not needed for
47 # pijuice_sys.py - A program that acts as a system daemon for monitoring the
50 rm $out/bin/pijuice_cli
51 rm $out/bin/pijuice_sys.py
52 rm $out/bin/pijuiceboot
53 mv $out/bin/pijuice_cli.py $out/bin/pijuice_cli
60 description = "Library and resources for PiJuice HAT for Raspberry Pi";
61 homepage = "https://github.com/PiSupply/PiJuice";
62 license = licenses.gpl3Plus;
63 maintainers = with maintainers; [ hexagonal-sun ];