[source]
git = "https://gitlab.redox-os.org/redox-os/relibc.git"

[build]
template = "custom"
script = """
# rustup workaround https://github.com/rust-lang/rustup/issues/988
if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then
if command -v rustup >/dev/null 2>&1; then
    pushd ${COOKBOOK_SOURCE}
    ${RUSTUP:-rustup} install
    popd
fi
fi

export CARGO=${CARGO:-env -u CARGO cargo}
"${COOKBOOK_MAKE}" \
    -C "${COOKBOOK_SOURCE}" \
    -j"${COOKBOOK_MAKE_JOBS}" \
    DESTDIR="${COOKBOOK_STAGE}/usr" \
    install
"""
