From 696e05528cac170c303cfaa4aaad52849be8455d Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 3 Dec 2019 11:17:12 -0600 Subject: [PATCH] cargo is required to build by default Ensure that cargo is specified as a build requirement by default since the template hardcodes the usage of cargo. fixes #7 --- src/config/arch.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/arch.rs b/src/config/arch.rs index 327d267..4ee495a 100644 --- a/src/config/arch.rs +++ b/src/config/arch.rs @@ -17,6 +17,11 @@ fn empty_string() -> String { "".to_string() } +/// cargo is used by the template so default that +fn default_depends() -> Vec { + vec!["cargo".to_string()] +} + /// data in `[package.metadata.arch]` section #[derive(Clone, Debug, Default, Deserialize)] pub struct CargoArch { @@ -83,7 +88,7 @@ pub struct CargoArch { #[serde(default)] pub depends: Vec, /// An array of packages this package depends on to build but are not needed at runtime. - #[serde(default)] + #[serde(default = "default_depends")] pub makedepends: Vec, /// An array of packages this package depends on to run its test suite but are not needed at runtime. #[serde(default)]