diff options
author | Peter Kolloch <info@eigenvalue.net> | 2024-02-21T07·07+0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-21T11·34+0000 |
commit | 035f617b7f11f2ec4a9e08e3a31a175e71a6544b (patch) | |
tree | 67bf2b777167dbfa1c7a885ed333a1f723dd994e /tvix/glue/src | |
parent | c06fb01b3b7a752e0c04ba21a02cdc3f431055e1 (diff) |
feat(tvix/nix-compat): input_sources as StorePath r/7584
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
Diffstat (limited to 'tvix/glue/src')
-rw-r--r-- | tvix/glue/src/builtins/derivation.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tvix/glue/src/builtins/derivation.rs b/tvix/glue/src/builtins/derivation.rs index 1208ca94de04..87ae8bb946bd 100644 --- a/tvix/glue/src/builtins/derivation.rs +++ b/tvix/glue/src/builtins/derivation.rs @@ -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 { |