fixup! feat(status): a status page, for the phone of whoever looks after the box
check / check (push) Canceled after 0s

install the app in /usr/local/lib/pdtv26-status, not in the state
directory: with DynamicUser, systemd makes /var/lib/pdtv26-status its
own symlink to /var/lib/private, and the service failed at
STATE_DIRECTORY ("File exists"). The package's check now catches a unit
that runs a program from its own StateDirectory.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-12-02 18:38:37 -06:00
1 parent f35da9b883
commit 7957d88ff9
3 files changed
+9 -3

No files matched your search

+7 -1
View File
@@ -6,7 +6,7 @@ stdenvNoCC.mkDerivation {
version = "0.1.0";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [ ./status.js ./status.test.js ./status-server.js ];
fileset = lib.fileset.unions [ ./status.js ./status.test.js ./status-server.js ./pdtv26-status.service ];
};
nativeCheckInputs = [ nodejs-slim ];
doCheck = true;
@@ -14,6 +14,12 @@ stdenvNoCC.mkDerivation {
runHook preCheck
node --check status-server.js
node --test
# With DynamicUser, systemd makes /var/lib/<StateDirectory> its own symlink, so nothing else
# can live there: the app (make install's GC root) goes elsewhere.
state=$(sed -n 's/^StateDirectory=//p' pdtv26-status.service)
if grep -q "^ExecStart=/var/lib/$state/" pdtv26-status.service; then
echo "pdtv26-status.service runs a program from its own StateDirectory, /var/lib/$state" >&2; exit 1
fi
runHook postCheck
'';
installPhase = ''