incus-ui-canonical: 0.14.6 -> 0.15

lxd upstream changelog:
https://github.com/canonical/lxd-ui/releases/tag/0.15
This commit is contained in:
Adam C. Stephens
2025-02-25 21:51:20 -05:00
parent 05431be3ac
commit c273acfbfe
2 changed files with 22 additions and 26 deletions
+9 -13
View File
@@ -15,13 +15,15 @@ import ../make-test-python.nix (
nodes.machine =
{ lib, ... }:
{
virtualisation = {
incus = {
enable = true;
package = if lts then pkgs.incus-lts else pkgs.incus;
};
incus.ui.enable = true;
virtualisation.incus = {
enable = true;
package = if lts then pkgs.incus-lts else pkgs.incus;
preseed.config."core.https_address" = ":8443";
ui.enable = true;
};
networking.nftables.enable = true;
environment.systemPackages =
@@ -63,16 +65,10 @@ import ../make-test-python.nix (
};
testScript = ''
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("incus.service")
machine.wait_for_file("/var/lib/incus/unix.socket")
# Configure incus listen address
machine.succeed("incus config set core.https_address :8443")
machine.succeed("systemctl restart incus")
# Check that the INCUS_UI environment variable is populated in the systemd unit
machine.succeed("cat /etc/systemd/system/incus.service | grep 'INCUS_UI'")
machine.succeed("systemctl cat incus.service | grep 'INCUS_UI'")
# Ensure the endpoint returns an HTML page with 'Incus UI' in the title
machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>Incus UI</title>'")
+13 -13
View File
@@ -1,6 +1,7 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
fetchYarnDeps,
nodejs,
@@ -9,32 +10,31 @@
nixosTests,
git,
}:
let
# this rarely changes https://github.com/zabbly/incus/blob/daily/patches/ui-canonical-renames.sed
renamesSed = fetchurl {
url = "https://raw.githubusercontent.com/zabbly/incus/0fa53811ff1043fd9f28c8b78851b60ca58e1b10/patches/ui-canonical-renames.sed";
hash = "sha256-f0vd/Xp/kBbZkg6CBM4cZPlwg5WUL/zv3mCAEmugzCE=";
};
in
stdenv.mkDerivation rec {
pname = "incus-ui-canonical";
version = "0.14.6";
version = "0.15";
src = fetchFromGitHub {
owner = "zabbly";
repo = "incus-ui-canonical";
tag = "incus-${version}";
hash = "sha256-An2mhIj3D2EdB1Bgnry1l2m6r/GIKTee4anSYNTq8B8=";
tag = version;
hash = "sha256-HqdaG51W7eUCGUhA+9pYrAWaA6qyK7Fc95CKJvk9GaA=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-dkATFNjAPhrPbXhcJ/R4eIpcagKEwBSnRfLwqTPIe6c=";
};
zabbly = fetchFromGitHub {
owner = "zabbly";
repo = "incus";
rev = "36714d7c38eb3cc3e4e821c7aed44e066e1e84ca";
hash = "sha256-H6gjXmwCv3oGXrzn1NENfgO3CWXMnmp94GdJv2Q8n0w=";
hash = "sha256-O7oEAjmCEmPpsO/rdkZVhUkxhFzhHpPRbmci3yRBA7g=";
};
patchPhase = ''
sed -i -f "$zabbly/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
find -type f -name "*.ts" -o -name "*.tsx" -o -name "*.scss" -o -name "*.html" | xargs sed -i -f ${renamesSed}
'';
nativeBuildInputs = [