WEFT_OS/infra/vm/run.sh
Marco Allegretti b0f208eba7 build(nix): add servo-shell/app-shell packages, real git hashes, fix VM configuration
- weft-packages.nix: add weft-servo-shell and weft-app-shell with servo-embed
  feature; real sha256 hashes for servo (8e7dc40) and stylo (dca3934) git deps
  computed via nix-prefetch-git; add clang/cmake/python3 as native build inputs
  for servo packages; set LIBCLANG_PATH; disable doCheck for VM builds
- configuration.nix: import virtualisation/qemu-vm.nix for system.build.vm;
  replace hardware.opengl with hardware.graphics (NixOS 24.11); add
  weft-servo-shell systemd user service; add servo-shell/app-shell/pack to
  environment packages
- infra/vm/build.sh: switch to system.build.vm target (qcow2 attribute not
  provided by default NixOS modules)
- infra/vm/run.sh: invoke the VM script produced by system.build.vm
2026-03-12 21:07:39 +01:00

18 lines
436 B
Bash

#!/usr/bin/env bash
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
RESULT="${1:-"${REPO_ROOT}/infra/vm/weft-vm-result"}"
if [ ! -e "$RESULT" ]; then
echo "error: $RESULT not found; run infra/vm/build.sh first" >&2
exit 1
fi
VM_SCRIPT="${RESULT}/bin/run-weft-vm-vm"
if [ ! -x "$VM_SCRIPT" ]; then
echo "error: VM script not found at $VM_SCRIPT" >&2
exit 1
fi
exec "$VM_SCRIPT" "$@"