feat(tvix/nix-compat): Use StorePath in Output

https: //b.tvl.fyi/issues/264
Change-Id: Icb09be9643245cc68d09f01d7723af2d44d6bd1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11001
Autosubmit: Peter Kolloch <info@eigenvalue.net>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
Peter Kolloch 2024-02-21 18:31:35 +07:00 committed by clbot
parent 035f617b7f
commit fde488ec6d
11 changed files with 119 additions and 82 deletions

View file

@ -4,10 +4,7 @@ use async_recursion::async_recursion;
use bytes::Bytes;
use futures::Stream;
use futures::{StreamExt, TryStreamExt};
use nix_compat::{
nixhash::CAHash,
store_path::{StorePath, StorePathRef},
};
use nix_compat::{nixhash::CAHash, store_path::StorePath};
use std::{
cell::RefCell,
collections::BTreeSet,
@ -153,16 +150,14 @@ impl TvixStoreIO {
let output_paths: Vec<StorePath> = output_names
.iter()
.map(|output_name| {
let output_path = &input_drv
input_drv
.outputs
.get(output_name)
.expect("missing output_name")
.path;
// since Derivation is validated, we this can be parsed.
StorePathRef::from_absolute_path(output_path.as_bytes())
.expect("invalid output path")
.to_owned()
.path
.as_ref()
.expect("missing output path")
.clone()
})
.collect();
// For each output, ask for the castore node.