diff --git a/config/wayland.toml b/config/wayland.toml index ae7cfe98..0e3c372f 100644 --- a/config/wayland.toml +++ b/config/wayland.toml @@ -69,7 +69,7 @@ cosmic-comp wayland-session # For smallvil (easier to debug) #export WAYLAND_DISPLAY=wayland-1 -#smallvil_smallvil & +#smallvil & #sleep 2 #wayland-session """ diff --git a/recipes/core/findutils/recipe.toml b/recipes/core/findutils/recipe.toml index 5c862253..6cdc88b7 100644 --- a/recipes/core/findutils/recipe.toml +++ b/recipes/core/findutils/recipe.toml @@ -2,8 +2,7 @@ git = "https://gitlab.redox-os.org/redox-os/findutils.git" [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo --bin find -""" +template = "cargo" +cargoflags = [ + "--bin find" +] diff --git a/recipes/core/pkgar/recipe.toml b/recipes/core/pkgar/recipe.toml index 34e3c2cf..1cedcdf2 100644 --- a/recipes/core/pkgar/recipe.toml +++ b/recipes/core/pkgar/recipe.toml @@ -2,8 +2,11 @@ git = "https://gitlab.redox-os.org/redox-os/pkgar.git" [build] -template = "custom" -script = """ -DYNAMIC_INIT -PACKAGE_PATH="pkgar" cookbook_cargo --features "cli" -""" +template = "cargo" +cargopackages = [ + "pkgar", + "pkgar-keys", +] +cargoflags = [ + "--features cli" +] diff --git a/recipes/core/pkgutils/recipe.toml b/recipes/core/pkgutils/recipe.toml index 0c500bd1..81dae2fe 100644 --- a/recipes/core/pkgutils/recipe.toml +++ b/recipes/core/pkgutils/recipe.toml @@ -5,6 +5,6 @@ git = "https://gitlab.redox-os.org/redox-os/pkgutils.git" template = "custom" script = """ # Must be statically linked -PACKAGE_PATH=pkg-cli +COOKBOOK_CARGO_PATH=pkg-cli cookbook_cargo """ diff --git a/recipes/demos/orbclient/recipe.toml b/recipes/demos/orbclient/recipe.toml index 27f07e47..0e68ad02 100644 --- a/recipes/demos/orbclient/recipe.toml +++ b/recipes/demos/orbclient/recipe.toml @@ -2,7 +2,7 @@ git = "https://gitlab.redox-os.org/redox-os/orbclient.git" [build] -template = "custom" -script = """ -cookbook_cargo_examples simple -""" +template = "cargo" +cargoexamples = [ + "simple" +] diff --git a/recipes/graphics/procedural-wallpapers-rs/recipe.toml b/recipes/graphics/procedural-wallpapers-rs/recipe.toml index 1b9cccac..a3d3536f 100644 --- a/recipes/graphics/procedural-wallpapers-rs/recipe.toml +++ b/recipes/graphics/procedural-wallpapers-rs/recipe.toml @@ -3,4 +3,4 @@ git = "https://github.com/lukas-kirschner/procedural-wallpapers-rs.git" [build] template = "cargo" -package_path = "procedural_wallpapers" +cargopath = "procedural_wallpapers" diff --git a/recipes/gui/orbutils-background/recipe.toml b/recipes/gui/orbutils-background/recipe.toml index fff3fd56..aa301dbb 100644 --- a/recipes/gui/orbutils-background/recipe.toml +++ b/recipes/gui/orbutils-background/recipe.toml @@ -3,8 +3,10 @@ same_as = "../orbutils" [build] template = "cargo" -package_path = "orbutils" -cargoflags = "--bin background" +cargopath = "orbutils" +cargoflags = [ + "--bin background" +] [package] dependencies = [ diff --git a/recipes/tools/cosmic-text/recipe.toml b/recipes/tools/cosmic-text/recipe.toml index 353feb35..37a8d0af 100644 --- a/recipes/tools/cosmic-text/recipe.toml +++ b/recipes/tools/cosmic-text/recipe.toml @@ -5,5 +5,7 @@ branch = "main" [build] template = "custom" script = """ -cookbook_cargo_packages editor +DYNAMIC_INIT +COOKBOOK_CARGO_FLAGS=() # remove --locked +COOKBOOK_CARGO_PATH=examples/editor cookbook_cargo_build """ diff --git a/recipes/tools/helix/recipe.toml b/recipes/tools/helix/recipe.toml index 5f83c1b4..788d58e9 100644 --- a/recipes/tools/helix/recipe.toml +++ b/recipes/tools/helix/recipe.toml @@ -10,7 +10,7 @@ template = "custom" script = """ DYNAMIC_INIT export CFLAGS="$CFLAGS -D__redox__" -PACKAGE_PATH="helix-term" cookbook_cargo +COOKBOOK_CARGO_PATH="helix-term" cookbook_cargo mv "${COOKBOOK_STAGE}/usr/bin/hx" "${COOKBOOK_STAGE}/usr/bin/helix" mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/grammars" mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/queries" diff --git a/recipes/tools/powerline/recipe.toml b/recipes/tools/powerline/recipe.toml index e8f2b616..23f3f385 100644 --- a/recipes/tools/powerline/recipe.toml +++ b/recipes/tools/powerline/recipe.toml @@ -8,7 +8,7 @@ export CARGOFLAGS="--no-default-features --features chrono" # --locked uses a reallyyyy old redox_syscall and libc which fails ${COOKBOOK_CARGO} install \ - --path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}" \ + --path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}" \ --root "${COOKBOOK_STAGE}/usr" \ --no-track \ --no-default-features \ diff --git a/recipes/wip/demos/fonterator/recipe.toml b/recipes/wip/demos/fonterator/recipe.toml index ccbbfec1..f9b931a1 100644 --- a/recipes/wip/demos/fonterator/recipe.toml +++ b/recipes/wip/demos/fonterator/recipe.toml @@ -11,7 +11,7 @@ examples="main directions image raster" for example in "${examples}" do "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ + --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ --example "${example}" \ --release \ --features "monospace-font" diff --git a/recipes/wip/demos/mousefood/recipe.toml b/recipes/wip/demos/mousefood/recipe.toml index a0a82c5c..761707ad 100644 --- a/recipes/wip/demos/mousefood/recipe.toml +++ b/recipes/wip/demos/mousefood/recipe.toml @@ -14,7 +14,7 @@ recipe="$(basename "${COOKBOOK_RECIPE}")" for example in simulator do "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ + --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ --example "${example}" \ --release \ --features=simulator diff --git a/recipes/wip/demos/ratzilla/recipe.toml b/recipes/wip/demos/ratzilla/recipe.toml index b6753f58..7da26483 100644 --- a/recipes/wip/demos/ratzilla/recipe.toml +++ b/recipes/wip/demos/ratzilla/recipe.toml @@ -6,28 +6,17 @@ shallow_clone = true template = "custom" script = """ DYNAMIC_INIT -recipe="$(basename "${COOKBOOK_RECIPE}")" -function build_from_dir { - prog_name=$1 - dir_name=$2 - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/examples/${dir_name}/Cargo.toml" \ - ${build_flags} - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/${prog_name}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${prog_name}" -} -build_from_dir animations animations -build_from_dir canvas-stress-test canvas_stress_test -build_from_dir canvas-waves canvas_waves -build_from_dir color-rgb colors_rgb -build_from_dir demo demo -build_from_dir demo2 demo2 -build_from_dir minimal minimal -build_from_dir pong pong -build_from_dir text_area text_area -build_from_dir user-input user_input -build_from_dir website website -build_from_dir world-map world_map +COOKBOOK_CARGO_FLAGS=() # remove --locked +COOKBOOK_CARGO_PATH="examples/animations" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/canvas_stress_test" bin_name="canvas-stress-test" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/canvas_waves" bin_name="canvas-waves" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/colors_rgb" bin_name="color-rgb" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/demo" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/demo2" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/minimal" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/pong" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/text_area" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/user_input" bin_name="user-input" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/website" cookbook_cargo_build +COOKBOOK_CARGO_PATH="examples/world_map" bin_name="world-map" cookbook_cargo_build """ diff --git a/recipes/wip/demos/rsille/recipe.toml b/recipes/wip/demos/rsille/recipe.toml index 344a9a7e..cdeb85f1 100644 --- a/recipes/wip/demos/rsille/recipe.toml +++ b/recipes/wip/demos/rsille/recipe.toml @@ -11,7 +11,7 @@ recipe="$(basename "${COOKBOOK_RECIPE}")" for example in imgille do "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ + --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ --example "${example}" \ --release \ --features=img diff --git a/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml b/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml index 3180b5e1..5ff6fc05 100644 --- a/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml +++ b/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml @@ -11,7 +11,7 @@ git = "https://github.com/dcampbell24/hnefatafl" template = "custom" script = """ "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ + --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ --features client \ --release \ --no-default-features diff --git a/recipes/wip/libs/other/tree-sitter/recipe.toml b/recipes/wip/libs/other/tree-sitter/recipe.toml index 07e2e11e..95209bda 100644 --- a/recipes/wip/libs/other/tree-sitter/recipe.toml +++ b/recipes/wip/libs/other/tree-sitter/recipe.toml @@ -9,7 +9,7 @@ patches = [ template = "custom" script = """ DYNAMIC_INIT -PACKAGE_PATH=cli cookbook_cargo \ +COOKBOOK_CARGO_PATH=cli cookbook_cargo \ --config 'patch.crates-io.rustix.git = "https://github.com/bytecodealliance/rustix"' \ --config 'patch.crates-io.rustix.rev = "8bf15a0"' cookbook_cmake "${COOKBOOK_SOURCE}"/lib diff --git a/recipes/wip/net/chat/termchat/recipe.toml b/recipes/wip/net/chat/termchat/recipe.toml index 1c4447ca..56a4cba0 100644 --- a/recipes/wip/net/chat/termchat/recipe.toml +++ b/recipes/wip/net/chat/termchat/recipe.toml @@ -4,4 +4,4 @@ git = "https://github.com/lemunozm/termchat" shallow_clone = true [build] template = "cargo" -cargoflags = "--all-features" +cargoflags = ["--all-features"] diff --git a/recipes/wip/net/download/rusty-psn-cli/recipe.toml b/recipes/wip/net/download/rusty-psn-cli/recipe.toml index d857c1b5..2fb14ef8 100644 --- a/recipes/wip/net/download/rusty-psn-cli/recipe.toml +++ b/recipes/wip/net/download/rusty-psn-cli/recipe.toml @@ -4,7 +4,7 @@ git = "https://github.com/RainbowCookie32/rusty-psn" shallow_clone = true [build] template = "cargo" -cargoflags = "--features cli" +cargoflags = ["--features cli"] dependencies = [ "openssl3", ] diff --git a/recipes/wip/net/download/youtube-tui/recipe.toml b/recipes/wip/net/download/youtube-tui/recipe.toml index 8470347a..a9fa4e22 100644 --- a/recipes/wip/net/download/youtube-tui/recipe.toml +++ b/recipes/wip/net/download/youtube-tui/recipe.toml @@ -4,7 +4,7 @@ git = "https://github.com/Siriusmart/youtube-tui" shallow_clone = true [build] template = "cargo" -cargoflags = "--no-default-features" +cargoflags = ["--no-default-features"] dependencies = [ "openssl3", ] diff --git a/recipes/wip/net/http/http-server-rs/recipe.toml b/recipes/wip/net/http/http-server-rs/recipe.toml index 368c4a33..ada10a45 100644 --- a/recipes/wip/net/http/http-server-rs/recipe.toml +++ b/recipes/wip/net/http/http-server-rs/recipe.toml @@ -18,5 +18,5 @@ DYNAMIC_INIT cp -v \ "target/${TARGET}/${build_type}/libfile_explorer_plugin.dylib" \ "${COOKBOOK_SOURCE}"/lib/http-server/inline/file_explorer.plugin.httprs -PACKAGE_PATH=crates/http-server cookbook_cargo --bin http-server +COOKBOOK_CARGO_PATH=crates/http-server cookbook_cargo --bin http-server """ diff --git a/recipes/wip/terminal/alacritty/recipe.toml b/recipes/wip/terminal/alacritty/recipe.toml index f2cc8562..bf00edb1 100644 --- a/recipes/wip/terminal/alacritty/recipe.toml +++ b/recipes/wip/terminal/alacritty/recipe.toml @@ -1,24 +1,16 @@ -#TODO not compiled or tested +#TODO need to patch glutin [source] git = "https://github.com/alacritty/alacritty" +shallow_clone = true [build] -template = "custom" +template = "cargo" dependencies = [ "freetype2", "fontconfig", "libxcb", ] -script = """ -DYNAMIC_INIT -package=alacritty -"${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ - --package "${package}" \ - --release \ - --no-default-features \ - --features=x11 - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/release/${package}" \ - "${COOKBOOK_STAGE}/usr/bin/${package}" -""" +cargopath = "alacritty" +cargoflags = [ + "--no-default-features", + "--features x11", +] diff --git a/recipes/wip/tools/sued/recipe.toml b/recipes/wip/tools/sued/recipe.toml index d88d7d6a..9a39cb57 100644 --- a/recipes/wip/tools/sued/recipe.toml +++ b/recipes/wip/tools/sued/recipe.toml @@ -4,4 +4,4 @@ git = "https://codeberg.org/AeriaVelocity/sued" [build] template = "cargo" -cargoflags = "--features=repl,startup,history" +cargoflags = ["--features=repl,startup,history"] diff --git a/recipes/wip/wayland/smallvil/recipe.toml b/recipes/wip/wayland/smallvil/recipe.toml index dd1d203b..bca7f512 100644 --- a/recipes/wip/wayland/smallvil/recipe.toml +++ b/recipes/wip/wayland/smallvil/recipe.toml @@ -4,14 +4,12 @@ git = "https://github.com/jackpot51/smithay" branch = "redox" [build] -template = "custom" +template = "cargo" dependencies = [ "libffi", "libwayland", "libxkbcommon", ] -script = """ -DYNAMIC_INIT -export RUSTFLAGS="${RUSTFLAGS} -lffi" -cookbook_cargo_packages smallvil -""" +cargopackages = [ + "smallvil" +] diff --git a/recipes/wip/web/servo/recipe.toml b/recipes/wip/web/servo/recipe.toml index 71615aa6..f03ec50b 100644 --- a/recipes/wip/web/servo/recipe.toml +++ b/recipes/wip/web/servo/recipe.toml @@ -40,7 +40,7 @@ export CLANGFLAGS="-I $PREFIX_INCLUDE/c++/13.2.0 -I $PREFIX_INCLUDE/c++/13.2.0/$ unset CC_WRAPPER export CARGO_MAKEFLAGS="-j $COOKBOOK_MAKE_JOBS" CCACHE="sccache" -PACKAGE_PATH="ports/servoshell" cookbook_cargo +COOKBOOK_CARGO_PATH="ports/servoshell" cookbook_cargo # resources packaging mkdir -p ${COOKBOOK_STAGE}/usr/lib/servo/bin diff --git a/src/cook/cook_build.rs b/src/cook/cook_build.rs index 3e47c3fc..3378047c 100644 --- a/src/cook/cook_build.rs +++ b/src/cook/cook_build.rs @@ -345,13 +345,38 @@ pub fn build( //TODO: Add more configurability, convert scripts to Rust? let script = match &recipe.build.kind { BuildKind::Cargo { - package_path, + cargopath, cargoflags, + cargopackages, + cargoexamples, } => { - format!( - "DYNAMIC_INIT\nPACKAGE_PATH={} cookbook_cargo {cargoflags}", - package_path.as_deref().unwrap_or(".") - ) + let mut script = format!( + "DYNAMIC_INIT\n{}\nCOOKBOOK_CARGO_PATH={} ", + flags_fn("COOKBOOK_CARGO_FLAGS", cargoflags), + cargopath.as_deref().unwrap_or(".") + ); + if cargopackages.len() == 0 && cargoexamples.len() == 0 { + script += "cookbook_cargo\n" + } else { + if cargopackages.len() > 0 { + script += "cookbook_cargo_packages"; + for package in cargopackages { + script += " "; + script += package; + } + script += "\n"; + } + if cargoexamples.len() > 0 { + script += "cookbook_cargo_examples"; + for example in cargoexamples { + script += " "; + script += example; + } + script += "\n"; + } + } + + script } BuildKind::Configure { configureflags } => format!( "DYNAMIC_INIT\n{}cookbook_configure", diff --git a/src/cook/fetch.rs b/src/cook/fetch.rs index e9a8164f..c55cd23f 100644 --- a/src/cook/fetch.rs +++ b/src/cook/fetch.rs @@ -396,12 +396,14 @@ pub fn fetch(recipe: &CookRecipe, check_source: bool, logger: &PtyOut) -> Result }; if let BuildKind::Cargo { - package_path, + cargopath, cargoflags: _, + cargopackages: _, + cargoexamples: _, } = &recipe.recipe.build.kind { // TODO: No need to fetch if !check_source and already fetched? - fetch_cargo(&source_dir, package_path.as_ref(), logger)?; + fetch_cargo(&source_dir, cargopath.as_ref(), logger)?; } fetch_apply_source_info(recipe, ident)?; @@ -481,12 +483,12 @@ pub(crate) fn fetch_extract_tar( pub(crate) fn fetch_cargo( source_dir: &PathBuf, - package_path: Option<&String>, + cargopath: Option<&String>, logger: &PtyOut, ) -> Result<(), String> { let mut source_dir = source_dir.clone(); - if let Some(package_path) = package_path { - source_dir = source_dir.join(package_path); + if let Some(cargopath) = cargopath { + source_dir = source_dir.join(cargopath); } let local_redoxer = Path::new("target/release/cookbook_redoxer"); diff --git a/src/cook/script.rs b/src/cook/script.rs index 24ccff4c..a705bb22 100644 --- a/src/cook/script.rs +++ b/src/cook/script.rs @@ -124,11 +124,11 @@ fi # to not strip symbols from the final package, add COOKBOOK_NOSTRIP=true to the recipe # (or to your environment) before calling cookbook_cargo or cookbook_cargo_packages build_type=release -install_flags= +install_flags=--no-track build_flags=--release if [ ! -z "${COOKBOOK_DEBUG}" ] then - install_flags=--debug + install_flags+=" --debug" build_flags= build_type=debug export CPPFLAGS="${CPPFLAGS} -g" @@ -142,16 +142,34 @@ fi reexport_flags -# cargo template COOKBOOK_CARGO="${COOKBOOK_REDOXER}" +COOKBOOK_CARGO_FLAGS=( + --locked +) +# cargo template using cargo install function cookbook_cargo { "${COOKBOOK_CARGO}" install \ - --path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}" \ + --path "${COOKBOOK_SOURCE}${COOKBOOK_CARGO_PATH:+/$COOKBOOK_CARGO_PATH}" \ --root "${COOKBOOK_STAGE}/usr" \ - --locked \ - --no-track \ - ${install_flags} \ - -j "${COOKBOOK_MAKE_JOBS}" "$@" + -j "${COOKBOOK_MAKE_JOBS}" ${install_flags} \ + ${COOKBOOK_CARGO_FLAGS[@]} "$@" +} + +# cargo template using cargo build (prefixed name) +function cookbook_cargo_build { + recipe="${recipe:-$(basename "${COOKBOOK_RECIPE}")}" + bin_dir="${bin_dir:-.}" + bin_flags="${bin_flags:-}" + bin_name="${bin_name:-$(basename "${COOKBOOK_CARGO_PATH}")}" + bin_final_name="${bin_final_name:-${recipe}_${bin_name//_/-}}" + mkdir -pv "${COOKBOOK_STAGE}/usr/bin" + "${COOKBOOK_CARGO}" build \ + --manifest-path "${COOKBOOK_SOURCE}${COOKBOOK_CARGO_PATH:+/$COOKBOOK_CARGO_PATH}/Cargo.toml" \ + ${bin_flags} ${build_flags} -j "${COOKBOOK_MAKE_JOBS}" ${COOKBOOK_CARGO_FLAGS[@]} + cp -v \ + "target/${TARGET}/${build_type}/${bin_dir}/${bin_name}" \ + "${COOKBOOK_STAGE}/usr/bin/${bin_final_name}" + unset bin_name bin_flags bin_dir bin_final_name } # helper for installing binaries that are cargo examples @@ -159,30 +177,17 @@ function cookbook_cargo_examples { recipe="$(basename "${COOKBOOK_RECIPE}")" for example in "$@" do - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ - --example "${example}" \ - ${build_flags} -j "${COOKBOOK_MAKE_JOBS}" - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/examples/${example}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${example}" + bin_dir="examples" bin_name="${example}" bin_flags="--example ${example}" cookbook_cargo_build done } # helper for installing binaries that are cargo packages function cookbook_cargo_packages { recipe="$(basename "${COOKBOOK_RECIPE}")" + mkdir -pv "${COOKBOOK_STAGE}/usr/bin" for package in "$@" do - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ - --package "${package}" \ - ${build_flags} -j "${COOKBOOK_MAKE_JOBS}" - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/${package}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${package}" + bin_name="${package}" bin_flags="--package ${package}" bin_final_name="${package//_/-}" cookbook_cargo_build done } diff --git a/src/recipe.rs b/src/recipe.rs index 9ed44548..61792e43 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -100,9 +100,13 @@ pub enum BuildKind { #[serde(rename = "cargo")] Cargo { #[serde(default)] - package_path: Option, + cargopath: Option, #[serde(default)] - cargoflags: String, + cargoflags: Vec, + #[serde(default)] + cargopackages: Vec, + #[serde(default)] + cargoexamples: Vec, }, /// Will build and install using configure and make #[serde(rename = "configure")] @@ -559,8 +563,10 @@ mod tests { shallow_clone: None, }), build: BuildRecipe::new(BuildKind::Cargo { - package_path: None, - cargoflags: String::new(), + cargopath: None, + cargoflags: Vec::new(), + cargopackages: Vec::new(), + cargoexamples: Vec::new(), }), ..Default::default() }