Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

nix/microvm: dont capture input of devshell drv, discard it

Signed-off-by: dawn <dawn@tangled.org>

author
dawn
date (Jun 24, 2026, 7:29 PM +0300) commit 7c4e0e3b parent 9b3e1670 change-id upyspuqw
+14 -15
+2 -1
nix/microvm/user-config.nix
··· 115 115 # put the devshell into the resulting image env. 116 116 # we do this instead of using a `.nix` file because it lets us skip eval time. 117 117 environment.etc = lib.mkIf (dependencies != []) { 118 - "spindle/devshell.drv".source = spindleDevShell.drvPath; 118 + # this is safe because we have the closure in the env also! 119 + "spindle/devshell-drv".text = builtins.unsafeDiscardStringContext spindleDevShell.drvPath; 119 120 "spindle/devshell-closure".source = pkgs.closureInfo {rootPaths = [spindleDevShell];}; 120 121 }; 121 122 services = builtins.mapAttrs (normalize (options.services or {})) (userConfig.services or {});
+11 -13
shuttle/src/activation.rs
··· 10 10 11 11 const USER_CONFIG_DIR: &str = "/run/spindle/user-config"; 12 12 const DEVSHELL_ENV_PATH: &str = "/run/spindle/devshell-env.sh"; 13 - const DEVSHELL_DRV: &str = "/etc/spindle/devshell.drv"; 13 + const DEVSHELL_DRV: &str = "/etc/spindle/devshell-drv"; 14 14 15 15 pub async fn run(id: String, req: v1::ActivateConfig, out: Sender<Message>) { 16 16 let config_key = req.config_key.clone(); ··· 58 58 } 59 59 60 60 async fn write_devshell_env(timeout: Duration) -> Result<()> { 61 - let drv = match fs::canonicalize(DEVSHELL_DRV) { 62 - Ok(p) => p, 63 - Err(_) => { 64 - let _ = fs::remove_file(DEVSHELL_ENV_PATH); 65 - return Ok(()); 66 - } 67 - }; 61 + let pointer = Path::new(DEVSHELL_DRV); 62 + if !pointer.exists() { 63 + let _ = fs::remove_file(DEVSHELL_ENV_PATH); 64 + return Ok(()); 65 + } 66 + let drv = fs::read_to_string(&pointer) 67 + .with_context(|| format!("read {pointer:?}"))? 68 + .trim() 69 + .to_owned(); 68 70 69 71 info!( 70 72 ?drv, ··· 72 74 ); 73 75 let output = run_capture( 74 76 Spec::new(nix_executable()) 75 - .args([ 76 - "print-dev-env".into(), 77 - "--show-trace".into(), 78 - drv.into_os_string(), 79 - ]) 77 + .args(["print-dev-env", "--show-trace", &drv]) 80 78 .cwd(SPINDLE_RUN_DIR) 81 79 .timeout(timeout), 82 80 )
+1 -1
spindle/engines/microvm/test-spindle-microvm.sh
··· 338 338 --work-dir "$work_dir" 339 339 --exec-timeout "$timeout" 340 340 --port "${SPINDLE_TEST_VSOCK_PORT:-10240}" 341 - --memory-mib 2049 341 + --memory-mib 4096 342 342 ) 343 343 344 344 if [ "$no_cache" -eq 0 ]; then