feat(tvix/nix-compat): input_sources as StorePath
https: //b.tvl.fyi/issues/264 Change-Id: I7a235734dc1f8e93e387a04ba369f3b702c6d5b6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10992 Autosubmit: Peter Kolloch <info@eigenvalue.net> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: Peter Kolloch <info@eigenvalue.net> Tested-by: BuildkiteCI
This commit is contained in:
parent
c06fb01b3b
commit
035f617b7f
6 changed files with 53 additions and 31 deletions
|
|
@ -4,7 +4,7 @@ use crate::tvix_store_io::TvixStoreIO;
|
|||
use bstr::BString;
|
||||
use nix_compat::derivation::{Derivation, Output};
|
||||
use nix_compat::nixhash;
|
||||
use nix_compat::store_path::StorePath;
|
||||
use nix_compat::store_path::{StorePath, StorePathRef};
|
||||
use std::collections::{btree_map, BTreeSet};
|
||||
use std::rc::Rc;
|
||||
use tvix_eval::builtin_macros::builtins;
|
||||
|
|
@ -24,7 +24,10 @@ fn populate_inputs(drv: &mut Derivation, full_context: NixContext) {
|
|||
for element in full_context.iter() {
|
||||
match element {
|
||||
NixContextElement::Plain(source) => {
|
||||
drv.input_sources.insert(source.clone());
|
||||
let sp = StorePathRef::from_absolute_path(source.as_bytes())
|
||||
.expect("invalid store path")
|
||||
.to_owned();
|
||||
drv.input_sources.insert(sp);
|
||||
}
|
||||
|
||||
NixContextElement::Single {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue