make deriver optional cause it won't be there if path is a derivation

This commit is contained in:
cy 2025-04-14 19:29:33 -04:00
parent df8d3a0bc6
commit 6b959f583b
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ use url::Url;
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct PathInfo { pub struct PathInfo {
pub deriver: StorePath<String>, pub deriver: Option<StorePath<String>>,
pub path: StorePath<String>, pub path: StorePath<String>,
signatures: Vec<String>, signatures: Vec<String>,
pub references: Vec<StorePath<String>>, pub references: Vec<StorePath<String>>,

View file

@ -159,7 +159,7 @@ impl<'a> Uploader<'a> {
signatures: Vec::new(), signatures: Vec::new(),
ca: None, ca: None,
system: None, system: None,
deriver: Some(self.path.deriver.as_ref()), deriver: self.path.deriver.as_ref().map(|x| x.as_ref()),
compression: Some("zstd"), compression: Some("zstd"),
file_hash: None, file_hash: None,
file_size: None, file_size: None,