Octoprint vcgencmd patch (#213201)

* octoprint: add tmpfile.d rule for read-access to /dev/vchiq for vcgencmd

fixes #210629

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>

* Update pkgs/applications/misc/octoprint/default.nix

---------

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Co-authored-by: Nick Cao <nickcao@nichi.co>
This commit is contained in:
Florian 2023-01-29 09:11:48 +01:00 committed by GitHub
parent 3fb81add3e
commit b9e6189341
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -106,6 +106,9 @@ in
systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' - ${cfg.user} ${cfg.group} - -"
# this will allow octoprint access to raspberry specific hardware to check for throttling
# read-only will not work: "VCHI initialization failed" error
"a /dev/vchiq - - - - u:octoprint:rw"
];
systemd.services.octoprint = {

View file

@ -82,6 +82,10 @@ let
# requires octoprint itself during tests
doCheck = false;
postPatch = ''
substituteInPlace octoprint_pi_support/__init__.py \
--replace /usr/bin/vcgencmd ${self.pkgs.libraspberrypi}/bin/vcgencmd
'';
};
}
)