diff --git a/recipes/gitoxide/recipe.toml b/recipes/gitoxide/recipe.toml
index a55b5da76c4d9415caca0935d69e60f59fce7913..4a531c082e91332266b2b80623715a2ae52a01a3 100644
--- a/recipes/gitoxide/recipe.toml
+++ b/recipes/gitoxide/recipe.toml
@@ -7,7 +7,7 @@ dependencies = [
 ]
 template = "custom"
 script = """
-export OPENSSL_DIR=${COOKBOOK_ROOT}/recipes/openssl/target/${TARGET}/stage
+export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
 export OPENSSL_STATIC="true"
 cookbook_cargo
 """