From 3e081637a6723b2624cd9b5ce51a2904067666df Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Mon, 17 Oct 2022 11:52:17 -0600
Subject: [PATCH] Update cargo recipe

---
 recipes/cargo/recipe.sh   | 11 -----------
 recipes/cargo/recipe.toml | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 11 deletions(-)
 delete mode 100644 recipes/cargo/recipe.sh
 create mode 100644 recipes/cargo/recipe.toml

diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh
deleted file mode 100644
index 2713ebec6..000000000
--- a/recipes/cargo/recipe.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-GIT=https://gitlab.redox-os.org/redox-os/cargo.git
-GIT_UPSTREAM=https://github.com/rust-lang/cargo.git
-BRANCH=redox
-BUILD_DEPENDS=(curl openssl zlib)
-
-function recipe_build {
-    sysroot="$(realpath ../sysroot)"
-    export DEP_OPENSSL_ROOT="$sysroot"
-    export OPENSSL_DIR="$sysroot"
-    export DEP_Z_ROOT="$sysroot"
-}
diff --git a/recipes/cargo/recipe.toml b/recipes/cargo/recipe.toml
new file mode 100644
index 000000000..db4243964
--- /dev/null
+++ b/recipes/cargo/recipe.toml
@@ -0,0 +1,17 @@
+[source]
+git = "https://gitlab.redox-os.org/redox-os/cargo.git"
+upstream = "https://github.com/rust-lang/cargo.git"
+branch = "redox-2022-03-18"
+
+[build]
+template = "custom"
+dependencies = [
+    "libssh2",
+    "openssl",
+    "zlib",
+]
+script = """
+export LIBSSH2_SYS_USE_PKG_CONFIG=1
+export LIBZ_SYS_STATIC=1
+cookbook_cargo
+"""
-- 
GitLab