lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pijuice: init at 1.7

+74
+61
pkgs/development/python-modules/pijuice/default.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , buildPythonPackage 4 + , pythonOlder 5 + , smbus-cffi 6 + , urwid 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "pijuice"; 11 + version = "1.7"; 12 + disabled = pythonOlder "3.6"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "PiSupply"; 16 + repo = "PiJuice"; 17 + # rev hash retrieved from the latest modification on file Software/Source/VERSION, as this project 18 + # does not use Github tags facility 19 + rev = "3ba6719ab614a3dc7495d5d9c900dd4ea977c7e3"; 20 + sha256 = "GoNN07YgVaktpeY5iYDbfpy5fxkU1x0V3Sb1hgGAQt4="; 21 + }; 22 + 23 + patches = [ 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. 27 + ./patch-shebang.diff 28 + ]; 29 + 30 + PIJUICE_BUILD_BASE = 1; 31 + 32 + preBuild = '' 33 + cd Software/Source 34 + ''; 35 + 36 + propagatedBuildInputs = [ smbus-cffi urwid ]; 37 + 38 + # Remove the following files from the package: 39 + # 40 + # pijuice_cli - A precompiled ELF binary that is a setuid wrapper for calling 41 + # pijuice_cli.py 42 + # 43 + # pijuiceboot - a precompiled ELF binary for flashing firmware. Not needed for 44 + # the python library. 45 + # 46 + # pijuice_sys.py - A program that acts as a system daemon for monitoring the 47 + # pijuice. 48 + preFixup = '' 49 + rm $out/bin/pijuice_cli 50 + rm $out/bin/pijuice_sys.py 51 + rm $out/bin/pijuiceboot 52 + mv $out/bin/pijuice_cli.py $out/bin/pijuice_cli 53 + ''; 54 + 55 + meta = with lib; { 56 + description = "Library and resources for PiJuice HAT for Raspberry Pi"; 57 + homepage = "https://github.com/PiSupply/PiJuice"; 58 + license = licenses.gpl3Plus; 59 + maintainers = with maintainers; [ hexagonal-sun ]; 60 + }; 61 + }
+9
pkgs/development/python-modules/pijuice/patch-shebang.diff
··· 1 + diff --git a/Software/Source/src/pijuice_cli.py b/Software/Source/src/pijuice_cli.py 2 + index c366fee..37af383 100644 3 + --- a/Software/Source/src/pijuice_cli.py 4 + +++ b/Software/Source/src/pijuice_cli.py 5 + @@ -1,3 +1,4 @@ 6 + +#!/usr/bin/python3 7 + # This python script to be executed as user pijuice by the setuid program pijuice_cli 8 + # Python 3 only 9 + #
+2
pkgs/top-level/all-packages.nix
··· 27431 27431 27432 27432 pijul = callPackage ../applications/version-management/pijul { }; 27433 27433 27434 + pijuice = with python3Packages; toPythonApplication pijuice; 27435 + 27434 27436 ping = callPackage ../applications/networking/ping { }; 27435 27437 27436 27438 piper = callPackage ../os-specific/linux/piper { };
+2
pkgs/top-level/python-packages.nix
··· 5946 5946 5947 5947 piexif = callPackage ../development/python-modules/piexif { }; 5948 5948 5949 + pijuice = callPackage ../development/python-modules/pijuice { }; 5950 + 5949 5951 pika = callPackage ../development/python-modules/pika { }; 5950 5952 5951 5953 pika-pool = callPackage ../development/python-modules/pika-pool { };