[source]
git = "https://gitlab.redox-os.org/redox-os/hematite.git"
branch = "redox"
upstream = "https://github.com/PistonDevelopers/hematite.git"

[build]
template = "custom"
dependencies = [
    "mesa",
    "zlib"
]
script = """
cargo rustc \
    --target "$TARGET" \
    --release \
    --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
    -- \
    -L "${COOKBOK_SYSROOT}/lib" \
    -C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/hematite" "${COOKBOOK_STAGE}/bin/hematite"
"""
