romm: fix reported version

(cherry picked from commit 060ffd2f2c)
This commit is contained in:
Ihar Hrachyshka
2026-10-06 23:14:49 -04:00
committed by github-actions[bot]
parent edf2026e86
commit 16f0181265
2 changed files with 11 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
{ lib, ... }:
{ config, lib, ... }:
{
name = "romm";
@@ -26,6 +26,8 @@
};
testScript = ''
import json
machine.start()
with subtest("services come up"):
@@ -39,7 +41,8 @@
machine.wait_for_unit("nginx.service")
with subtest("backend API answers"):
machine.succeed("curl -sf http://127.0.0.1:8080/api/heartbeat")
heartbeat = json.loads(machine.succeed("curl -sf http://127.0.0.1:8080/api/heartbeat"))
assert heartbeat["SYSTEM"]["VERSION"] == ${builtins.toJSON config.nodes.machine.services.romm.package.version}
with subtest("nginx serves the frontend and proxies the API"):
machine.succeed("curl -sf http://localhost/ | grep -iq romm")

View File

@@ -32,6 +32,12 @@ stdenvNoCC.mkDerivation (
nativeBuildInputs = [ makeWrapper ];
# Upstream stamps this placeholder during its container release build.
postPatch = ''
substituteInPlace backend/__version__.py \
--replace-fail '<version>' '${finalAttrs.version}'
'';
dontConfigure = true;
dontBuild = true;