<commit_before>[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
"""<commit_msg>Use system curl and nghttp2 for cargo<commit_after>[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 = [
    "curl",
    "libssh2",
    "nghttp2",
    "openssl",
    "zlib",
]
script = """
export LIBSSH2_SYS_USE_PKG_CONFIG=1
export LIBZ_SYS_STATIC=1
export DEP_NGHTTP2_ROOT="${COOKBOOK_SYSROOT}"
export DEP_OPENSSL_ROOT="${COOKBOOK_SYSROOT}"
export DEP_Z_ROOT="${COOKBOOK_SYSROOT}"
# Force linking system nghttp2
"${COOKBOOK_CARGO}" rustc \
    --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
    --release \
    --bin cargo \
    -- \
    -L "${COOKBOOK_SYSROOT}/lib" \
    -C link-arg="-lnghttp2"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/cargo" "${COOKBOOK_STAGE}/bin/cargo"
"""
{'fraction_non_alphanumeric': 0.17558528428093645, 'fraction_numerical': 0.024247491638795988, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5363695', 'n_tokens_mistral': 516, 'n_tokens_neox': 488, 'n_words': 75}