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:
parent
3fb81add3e
commit
b9e6189341
2 changed files with 7 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue