Skip to content

Commit c273acf

Browse files
committed
incus-ui-canonical: 0.14.6 -> 0.15
lxd upstream changelog: https://github.com/canonical/lxd-ui/releases/tag/0.15
1 parent 05431be commit c273acf

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

nixos/tests/incus/ui.nix

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ import ../make-test-python.nix (
1515
nodes.machine =
1616
{ lib, ... }:
1717
{
18-
virtualisation = {
19-
incus = {
20-
enable = true;
21-
package = if lts then pkgs.incus-lts else pkgs.incus;
22-
};
23-
incus.ui.enable = true;
18+
19+
virtualisation.incus = {
20+
enable = true;
21+
package = if lts then pkgs.incus-lts else pkgs.incus;
22+
23+
preseed.config."core.https_address" = ":8443";
24+
ui.enable = true;
2425
};
26+
2527
networking.nftables.enable = true;
2628

2729
environment.systemPackages =
@@ -63,16 +65,10 @@ import ../make-test-python.nix (
6365
};
6466

6567
testScript = ''
66-
machine.wait_for_unit("sockets.target")
6768
machine.wait_for_unit("incus.service")
68-
machine.wait_for_file("/var/lib/incus/unix.socket")
69-
70-
# Configure incus listen address
71-
machine.succeed("incus config set core.https_address :8443")
72-
machine.succeed("systemctl restart incus")
7369
7470
# Check that the INCUS_UI environment variable is populated in the systemd unit
75-
machine.succeed("cat /etc/systemd/system/incus.service | grep 'INCUS_UI'")
71+
machine.succeed("systemctl cat incus.service | grep 'INCUS_UI'")
7672
7773
# Ensure the endpoint returns an HTML page with 'Incus UI' in the title
7874
machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>Incus UI</title>'")

pkgs/by-name/in/incus-ui-canonical/package.nix

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
stdenv,
4+
fetchurl,
45
fetchFromGitHub,
56
fetchYarnDeps,
67
nodejs,
@@ -9,32 +10,31 @@
910
nixosTests,
1011
git,
1112
}:
12-
13+
let
14+
# this rarely changes https://github.com/zabbly/incus/blob/daily/patches/ui-canonical-renames.sed
15+
renamesSed = fetchurl {
16+
url = "https://raw.githubusercontent.com/zabbly/incus/0fa53811ff1043fd9f28c8b78851b60ca58e1b10/patches/ui-canonical-renames.sed";
17+
hash = "sha256-f0vd/Xp/kBbZkg6CBM4cZPlwg5WUL/zv3mCAEmugzCE=";
18+
};
19+
in
1320
stdenv.mkDerivation rec {
1421
pname = "incus-ui-canonical";
15-
version = "0.14.6";
22+
version = "0.15";
1623

1724
src = fetchFromGitHub {
1825
owner = "zabbly";
1926
repo = "incus-ui-canonical";
20-
tag = "incus-${version}";
21-
hash = "sha256-An2mhIj3D2EdB1Bgnry1l2m6r/GIKTee4anSYNTq8B8=";
27+
tag = version;
28+
hash = "sha256-HqdaG51W7eUCGUhA+9pYrAWaA6qyK7Fc95CKJvk9GaA=";
2229
};
2330

2431
offlineCache = fetchYarnDeps {
2532
yarnLock = "${src}/yarn.lock";
26-
hash = "sha256-dkATFNjAPhrPbXhcJ/R4eIpcagKEwBSnRfLwqTPIe6c=";
27-
};
28-
29-
zabbly = fetchFromGitHub {
30-
owner = "zabbly";
31-
repo = "incus";
32-
rev = "36714d7c38eb3cc3e4e821c7aed44e066e1e84ca";
33-
hash = "sha256-H6gjXmwCv3oGXrzn1NENfgO3CWXMnmp94GdJv2Q8n0w=";
33+
hash = "sha256-O7oEAjmCEmPpsO/rdkZVhUkxhFzhHpPRbmci3yRBA7g=";
3434
};
3535

3636
patchPhase = ''
37-
sed -i -f "$zabbly/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
37+
find -type f -name "*.ts" -o -name "*.tsx" -o -name "*.scss" -o -name "*.html" | xargs sed -i -f ${renamesSed}
3838
'';
3939

4040
nativeBuildInputs = [

0 commit comments

Comments
 (0)