Skip to repository content71 lines · 1.7 KB · text
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T01:55:17.413Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
helper.nix
1# Builds the `bwrap_test_helper` binary (sandbox crate, `nixos-test` feature)
2# used by the Bubblewrap sandbox VM tests in this directory.
3{
4 pkgs,
5 inputs,
6}:
7let
8 lib = pkgs.lib;
9
10 rustBin = inputs.rust-overlay.lib.mkRustBin { } pkgs;
11 rustToolchain = rustBin.fromRustupToolchainFile ../../../rust-toolchain.toml;
12 craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain;
13
14 src = builtins.path {
15 path = ../../../.;
16 filter =
17 path: type:
18 let
19 root = toString ../../../. + "/";
20 relPath = lib.removePrefix root path;
21 firstComp = builtins.head (lib.path.subpath.components relPath);
22 in
23 builtins.elem firstComp [
24 "crates"
25 "assets"
26 "extensions"
27 "script"
28 "tooling"
29 "Cargo.toml"
30 ".config"
31 ".cargo"
32 ];
33 name = "bwrap-test-helper-source";
34 };
35
36 commonArgs = {
37 pname = "bwrap-test-helper";
38 version = "0.0.0";
39 inherit src;
40 cargoLock = ../../../Cargo.lock;
41 cargoExtraArgs = "-p sandbox --bin bwrap_test_helper --features sandbox/nixos-test --locked";
42 CARGO_PROFILE = "dev";
43 doCheck = false;
44
45 cargoVendorDir = craneLib.vendorCargoDeps {
46 inherit src;
47 cargoLock = ../../../Cargo.lock;
48 };
49 };
50
51 cargoArtifacts = craneLib.buildDepsOnly commonArgs;
52in
53craneLib.buildPackage (
54 commonArgs
55 // {
56 inherit cargoArtifacts;
57
58 installPhase = ''
59 runHook preInstall
60 mkdir -p $out/bin
61 cp target/debug/bwrap_test_helper $out/bin/bwrap_test_helper
62 runHook postInstall
63 '';
64
65 meta = {
66 description = "Bubblewrap sandbox behavior test helper";
67 platforms = lib.platforms.linux;
68 };
69 }
70)
71