From 3abf183ae34667f4436cd3f7e8d7c21250bf2878 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 10 Apr 2026 17:37:20 +0200 Subject: [PATCH] app integration support --- nix/image/haze.nix | 4 ++-- nix/image/scripts/integration | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/nix/image/haze.nix b/nix/image/haze.nix index b78ec51..3dd6567 100644 --- a/nix/image/haze.nix +++ b/nix/image/haze.nix @@ -8,9 +8,7 @@ coreutils, getent, shadow, - buildEnv, runCommand, - cacert, callPackage, cronie, redis, @@ -36,6 +34,7 @@ python3Packages, dnsmasq, frankenphp, + nushell, }: let inherit (builtins) toString; inherit (lib) readFile getExe concatStringsSep splitString take; @@ -152,6 +151,7 @@ helix python3Packages.supervisor dnsmasq + nushell ]; }; diff --git a/nix/image/scripts/integration b/nix/image/scripts/integration index 4f73aef..8477132 100755 --- a/nix/image/scripts/integration +++ b/nix/image/scripts/integration @@ -1,4 +1,18 @@ -#!/bin/sh +#!/bin/nu -cd $WEBROOT/build/integration -./run.sh "$@" +def main [feature: path, ...rest] { + mut feature = $feature; + mut workdir = $"($env.WEBROOT)/build/integration" + if ($feature | str starts-with "apps/") { + let parts = $feature | split row '/' + occ app:enable $parts.1 + let parts = $feature | split row -n 2 '/features/' + $workdir = $parts.0 + $feature = $"features/($parts.1)" + } else if ($feature | str starts-with "build/integration/") { + $feature = $feature | str replace "build/integration/" "" + } + + cd $workdir + bash run.sh $feature ...$rest +}