feat(tvix/cli): add helper for populating drv output configuration
This threads through the fields that control whether a derivation is a fixed-output derivation or not. Change-Id: I49739de178fed9f258291174ca1a2c15a7cf5c2a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7900 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
parent
fdca93d6ed
commit
dfc50c9ef5
2 changed files with 125 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ pub enum Error {
|
|||
DuplicateEnvVar(String),
|
||||
ShadowedOutput(String),
|
||||
InvalidDerivation(DerivationError),
|
||||
InvalidOutputHashMode(String),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
|
|
@ -32,6 +33,11 @@ impl Display for Error {
|
|||
"the environment variable '{name}' shadows the name of an output"
|
||||
),
|
||||
Error::InvalidDerivation(error) => write!(f, "invalid derivation parameters: {error}"),
|
||||
|
||||
Error::InvalidOutputHashMode(mode) => write!(
|
||||
f,
|
||||
"invalid output hash mode: '{mode}', only 'recursive' and 'flat` are supported"
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue