nix_compat/derivation/
errors.rs1use crate::store_path::{self, StorePath};
3use thiserror::Error;
4
5#[derive(Debug, Error, PartialEq)]
7#[allow(missing_docs)]
8pub enum DerivationError {
9 #[error("unable to parse derivation name {0}: {1}")]
10 InvalidDerivationName(String, #[source] store_path::ParseStorePathError),
11
12 #[error("{0}")]
14 InvalidOutputs(
15 #[from]
16 #[source]
17 super::outputs::OutputsError,
18 ),
19 #[error("unable to parse input derivation path {0}: {1}")]
21 InvalidInputDerivationPath(String, #[source] store_path::ParseStorePathError),
22 #[error("unable to lookup input derivation {0}")]
23 MissingInputDerivation(StorePath),
24 #[error("input derivation {0} doesn't end with .drv")]
25 InvalidInputDerivationPrefix(String),
26 #[error("input derivation {0} output names are empty")]
27 EmptyInputDerivationOutputNames(String),
28 #[error("input derivation {0} output name {1} is invalid")]
29 InvalidInputDerivationOutputName(String, String),
30
31 #[error("unable to parse input sources path {0}: {1}")]
33 InvalidInputSourcesPath(String, #[source] store_path::ParseStorePathError),
34
35 #[error("invalid platform field: {0}")]
37 InvalidPlatform(String),
38
39 #[error("invalid builder field: {0}")]
41 InvalidCommand(String),
42
43 #[error("invalid environment key {0}")]
45 InvalidEnvironmentKey(String),
46}