Use this file to discover all available pages before exploring further.
melange convert is an experimental command that auto-generates melange YAML configuration files from existing upstream package definitions. It supports three sources: Alpine Linux APKBUILD files, Ruby gems from RubyGems.org, and Python packages from PyPI. The generated YAML gives you a starting point — it captures dependencies, version, and source information — but will almost always require manual review and editing before it produces a working build.
melange convert is an experimental command. The output is a best-effort translation that may contain incorrect dependency mappings, missing pipeline steps, or other issues. Always review the generated YAML before attempting to build it.
Converts an Alpine Linux APKBUILD package definition into a melange YAML file. By default it fetches the APKBUILD from the Alpine aports repository on git.alpinelinux.org.
# Convert the libx11 package from Alpine mainmelange convert apkbuild libx11# Convert and write to a specific directorymelange convert apkbuild libx11 --out-dir ./generated# Exclude certain dependency packages from auto-generationmelange convert apkbuild mypackage --exclude-packages glibc,libc-dev# Use a custom APKBUILD URI format (e.g. community repo)melange convert apkbuild mypkg \ --base-uri-format "https://git.alpinelinux.org/aports/plain/community/%s/APKBUILD"
Converts a Ruby gem from RubyGems.org into a melange YAML file. It queries the RubyGems JSON API to fetch gem metadata and generates a melange config that builds the gem for the specified Ruby version.
Converts a Python package from PyPI into a melange YAML file. It queries the PyPI JSON API to fetch package metadata, resolves dependencies, and generates a melange config for the specified Python version.
# Convert the latest botocore packagemelange convert python botocore# Convert a specific versionmelange convert python botocore --package-version 1.34.0# Convert and output to a directorymelange convert python requests --out-dir ./python-packages# Build for Python 3.12melange convert python cryptography --python-version 3.12# Preserve the raw PyPI base URI (instead of the friendly URL)melange convert python mypackage --preserve-base-uri
The generated YAML is a starting point. Before building, review and address:
Common issues in generated configs
Dependency names: Alpine/gem/PyPI dependency names rarely map 1:1 to Wolfi package names. Check each entry in environment.contents.packages.
Source URLs: Verify that fetch URLs and checksums are correct for the version being packaged.
Build steps: The generated pipeline is a best-effort approximation. Complex packages may need additional steps or different build systems.
Subpackages: Headers, documentation, and development files may need to be split into -dev and -doc subpackages.
Licenses: Confirm the SPDX license identifier is accurate.
# After converting, attempt a build to see what breaksmelange convert python requests --out-dir ./generatedmelange build ./generated/requests.yaml --runner docker
Set the GITHUB_TOKEN environment variable when running melange convert python with --use-github to avoid hitting the GitHub API rate limit during commit hash resolution.