Type SimpleRecipe | ComplexRecipe
File match recipe.yaml recipe.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/rattler-build/latest.json
Source https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json

Validate with Lintel

npx @lintel/lintel check

Any of

1. SimpleRecipe object
2. ComplexRecipe object

Definitions

About object
homepage string | null

Url of the homepage of the package.

Default: null
repository string | null

Url that points to where the source code is hosted e.g. (github.com)

Default: null
documentation string | null

Url that points to where the documentation is hosted.

Default: null
license string | null

An license in SPDX format.

Default: null
license_file string | IfStatement | string | IfStatement[] | null

Paths to the license files of this package.

Default: null
license_family string | null

The license family (deprecated, but still used in some recipes).

Default: null
summary string | null

A short description of the package.

Default: null
description string | null

Extended description of the package.

Default: null
prelink_message string | null
Default: null
AttestationConfig object
bundle_url string | null

URL to download the attestation bundle from (e.g., .sigstore.json file). Auto-derived for PyPI sources if not specified.

Default: null
publishers string[]

Publisher identities to verify (e.g., 'github:owner/repo'). All specified publishers must match.

Default:
[]
BaseGitSource object
git string | string required

The url that points to the git repository.

patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
depth integer | null

A value to use when shallow cloning the repository.

Default: null
lfs boolean

Should we LFS files be checked out as well

Default: false
submodules boolean | null

Whether to recursively initialize and update submodules.

Default: null
expected_commit string | null

An expected commit hash to verify after checkout.

Default: null
Build object
number integer | string | null

Build number to version current build in addition to package version

Default: 0
string string | string | null

The build string to identify build variant. This is usually omitted (can use ${{ hash }}) variable here)

Default: null
skip string | boolean | string | boolean[] | null

List of conditions under which to skip the build of the package. If any of these condition returns true the build is skipped.

Default: null
noarch string | null

Can be either 'generic' or 'python'. A noarch 'python' package compiles .pyc files upon installation.

Default: null
script string | FileScript | ContentScript | string | IfStatement | string | IfStatement[] | null

The script to execute to invoke the build. If the string is a single line and ends with .sh or .bat, then we interpret it as a file.

Default: null
merge_build_and_host_envs boolean | string | null

Merge the build and host environments (used in many R packages on Windows)

Default: false
always_include_files string | IfStatement | string | IfStatement[]

Files to be included even if they are present in the PREFIX before building.

Default:
[]
always_copy_files string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

Do not soft- or hard-link these files but instead always copy them into the environment

Default:
[]
variant Variant | null

Options that influence how the different variants are computed.

Default: null
python Python | null

Python specific build configuration

Default: null
dynamic_linking DynamicLinking | null

Configuration to post-process dynamically linked libraries and executables

Default: null
prefix_detection PrefixDetection | null

Options that influence how the prefix replacement is done.

Default: null
files string | IfStatement | string | IfStatement[] | GlobDict

Glob patterns to include or exclude files from the package.

Default: null
post_process PostProcess | IfStatement | PostProcess | IfStatement[]

Post-processing operations using regex replacements on files.

Default:
[]
Cache object
source UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement[] | null

The source items to be downloaded and used for the cache build and subsequent outputs.

Default: null
requirements Requirements | null

The dependencies needed at cache-build time.

Default: null
build Build | null

Describes how the package should be build.

Default: null
CacheInherit object
from string required

Name of the staging cache to inherit from.

minLength=1
run_exports boolean

Whether to inherit run_exports from the staging cache.

Default: true
ComplexPackage object
name string | null required

The recipe name, this is only used to identify the name of the recipe.

version string | null

The version of each output, this can be overwritten per output

Default: null
ComplexRecipe object
outputs Output | StagingOutput | IfStatement | Output | StagingOutput | IfStatement[] required

A list of outputs that are generated for this recipe.

schema_version integer

The version of the YAML schema for a recipe. If the version is omitted it is assumed to be 1.

Default: 1
min=1max=1
context object | null

Defines arbitrary key-value pairs for Jinja interpolation

Default: null
source UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement_Union_UrlSource__GitRev__GitTag__GitBranch__BaseGitSource__LocalSource__ | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement_Union_UrlSource__GitRev__GitTag__GitBranch__BaseGitSource__LocalSource__[] | null

The source items to be downloaded and used for the build.

Default: null
build Build | null

Describes how the package should be build.

Default: null
about About | null

A human readable description of the package information

Default: null
extra object | null

An set of arbitrary values that are included in the package manifest

Default: null
recipe ComplexPackage | null

The package version.

Default: null
cache Cache | null

The cache build that can be used as a common build step for all output.

Default: null
tests ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement | ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement[] | null

Top-level tests that are inherited by outputs

Default: null
ContentScript object
content string | IfStatement | string | IfStatement[] required

A string or list of strings that is the scripts contents

interpreter string | null

The interpreter to use for the script.

Defaults to bash on unix and cmd.exe on Windows.

Default: null
env Record<string, string>

the script environment.

You can use Jinja to pass through environments variables with the env object (e.g. ${{ env.get("MYVAR") }})

Default:
{}
secrets string | IfStatement | string | IfStatement[]

Secrets that are set as environment variables but never shown in the logs or the environment.

Default:
[]
cwd string | null

The working directory to use when executing the script.

Default: null
DownstreamTestElement object
downstream string required

Install the package and use the output of this package to test if the tests in the downstream package still succeed.

DynamicLinking object
rpaths string | IfStatement | string | IfStatement[]

linux only, list of rpaths (was rpath)

Default:
[
  "lib/"
]
binary_relocation boolean | string | string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

Whether to relocate binaries or not. If this is a list of paths then only the listed paths are relocated

Default: true
missing_dso_allowlist string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

Allow linking against libraries that are not in the run requirements

Default:
[]
rpath_allowlist string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

Allow runpath/rpath to point to these locations outside of the environment

Default:
[]
overdepending_behavior string

What to do when detecting overdepending. Overdepending means that a requirement a run requirement is specified but none of the artifacts from the build link against any of the shared libraries of the requirement.

Default: "error"
Values: "ignore" "error"
overlinking_behavior string

What to do when detecting overdepending. Overlinking occurs when an artifact links against a library that was not specified in the run requirements.

Default: "error"
Values: "ignore" "error"
FileExistenceCheck object
exists string | IfStatement | string | IfStatement[] | null

Files or glob patterns that must exist anywhere inside the package.

Default:
[]
not_exists string | IfStatement | string | IfStatement[] | null

Files or glob patterns that must NOT exist anywhere inside the package.

Default:
[]
FileScript object
file string | string required

The file to use as the script. Automatically adds the bat or sh to the filename on Windows or Unix respectively (if no file extension is given).

interpreter string | null

The interpreter to use for the script.

Defaults to bash on unix and cmd.exe on Windows.

Default: null
env Record<string, string>

the script environment.

You can use Jinja to pass through environments variables with the env object (e.g. ${{ env.get("MYVAR") }})

Default:
{}
secrets string | IfStatement | string | IfStatement[]

Secrets that are set as environment variables but never shown in the logs or the environment.

Default:
[]
cwd string | null

The working directory to use when executing the script.

Default: null
ForceFileType object
text string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

force TEXT file type

Default:
[]
binary string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

force BINARY file type

Default:
[]
GitBranch object
git string | string required

The url that points to the git repository.

branch string required

Branch to check out

minLength=1
patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
depth integer | null

A value to use when shallow cloning the repository.

Default: null
lfs boolean

Should we LFS files be checked out as well

Default: false
submodules boolean | null

Whether to recursively initialize and update submodules.

Default: null
expected_commit string | null

An expected commit hash to verify after checkout.

Default: null
GitRev object
git string | string required

The url that points to the git repository.

rev string required

Revision to checkout to (hash or ref)

minLength=1
patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
depth integer | null

A value to use when shallow cloning the repository.

Default: null
lfs boolean

Should we LFS files be checked out as well

Default: false
submodules boolean | null

Whether to recursively initialize and update submodules.

Default: null
expected_commit string | null

An expected commit hash to verify after checkout.

Default: null
GitTag object
git string | string required

The url that points to the git repository.

tag string required

Tag to checkout

minLength=1
patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
depth integer | null

A value to use when shallow cloning the repository.

Default: null
lfs boolean

Should we LFS files be checked out as well

Default: false
submodules boolean | null

Whether to recursively initialize and update submodules.

Default: null
expected_commit string | null

An expected commit hash to verify after checkout.

Default: null
GlobDict object
include string | IfStatement | string | IfStatement[]

Glob patterns to include

Default:
[]
exclude string | IfStatement | string | IfStatement[]

Glob patterns to exclude

Default:
[]
IfStatement object
if string required
then array required
else array | null
Default: null
IfStatement_Annotated_str__StringConstraints__ object
if string required
then string | string[] required
else string | string[] | null
Default: null
IfStatement_Union_ScriptTestElement__PythonTestElement__PerlTestElement__RTestElement__RubyTestElement__DownstreamTestElement__PackageContentTest__ object
if string required
then ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest[] required
else ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest[] | null
Default: null
IfStatement_Union_UrlSource__GitRev__GitTag__GitBranch__BaseGitSource__LocalSource__ object
if string required
then UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource[] required
else UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource[] | null
Default: null
IgnoreRunExports object
by_name string | IfStatement | string | IfStatement[]

ignore run exports by name (e.g. libgcc-ng)

Default:
[]
from_package string | IfStatement | string | IfStatement[]

ignore run exports that come from the specified packages

Default:
[]
LocalSource object
path string required

A path on the local machine that contains the source.

patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
sha256 string | string | null

The SHA256 hash of the source archive

Default: null
md5 string | string | null

The MD5 hash of the source archive

Default: null
use_gitignore boolean

Whether or not to use the .gitignore file when copying the source.

Default: true
file_name string | null

A file name to rename the file to (does not apply to archives).

Default: null
filter string | IfStatement | string | IfStatement[] | GlobDict

Glob patterns to include or exclude files from the package.

Default: null
Output object
package ComplexPackage | null

The package name and version, this overwrites any top-level fields.

Default: null
inherit string | CacheInherit | null

Name of the staging cache to inherit from, or an object with from and run_exports options.

Default: null
source UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement[] | null

The source items to be downloaded and used for the build.

Default: null
build Build | null

Describes how the package should be build.

Default: null
requirements Requirements | null

The package dependencies

Default: null
tests ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement_Union_ScriptTestElement__PythonTestElement__PerlTestElement__RTestElement__RubyTestElement__DownstreamTestElement__PackageContentTest__ | ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement_Union_ScriptTestElement__PythonTestElement__PerlTestElement__RTestElement__RubyTestElement__DownstreamTestElement__PackageContentTest__[][] | null

Tests to run after packaging

Default: null
about About | null

A human readable description of the package information. The values here are merged with the top level about field.

Default: null
PackageContentTest object
package_contents required

Test if the package contains the specified files.

All of: PackageContentTestInner object
PackageContentTestInner object
files string | IfStatement | string | IfStatement[] | FileExistenceCheck | null

Files expectations for the whole package. Can be a list of files/globs or an object with exists/not_exists.

Default: null
include string | IfStatement | string | IfStatement[] | FileExistenceCheck | null

Files that should be in the include/ folder of the package. This folder is found under $PREFIX/include on Unix and $PREFIX/Library/include on Windows.

Default:
[]
site_packages string | IfStatement | string | IfStatement[] | FileExistenceCheck | null

Files that should be in the site-packages/ folder of the package. This folder is found under $PREFIX/lib/pythonX.Y/site-packages on Unix and $PREFIX/Lib/site-packages on Windows.

Default:
[]
bin string | IfStatement | string | IfStatement[] | FileExistenceCheck | null

Files that should be in the bin/ folder of the package. This folder is found under $PREFIX/bin on Unix. On Windows this searches for files in %PREFIX, %PREFIX%/bin, %PREFIX%/Scripts, %PREFIX%/Library/bin, %PREFIX/Library/usr/bin and %PREFIX/Library/mingw-w64/bin.

Default:
[]
lib string | IfStatement | string | IfStatement[] | null

Files that should be in the lib/ folder of the package. This folder is found under $PREFIX/lib on Unix and %PREFIX%/Library/lib on Windows.

Default:
[]
strict boolean

When true, the package must not contain any files other than those specified.

Default: false
PerlTestElement object
perl required

Perl specific test configuration

All of: PerlTestElementInner object
PerlTestElementInner object
uses string | IfStatement | string | IfStatement[] required

A list of Perl modules to check after having installed the built package.

PostProcess object
files string | IfStatement | string | IfStatement[] required

Files to apply post-processing to

regex string | string required

Regular expression pattern to match

replacement string | string required

Replacement string

PrefixDetection object
force_file_type ForceFileType | null

force the file type of the given files to be TEXT or BINARY

Default: null
ignore boolean | string | string | IfStatement | string | IfStatement[]

Ignore all or specific files for prefix replacement

Default: false
ignore_binary_files boolean | string

Whether to detect binary files with prefix or not

Default: false
Python object
entry_points string | IfStatement | string | IfStatement[]
Default:
[]
use_python_app_entrypoint boolean | string

Specifies if python.app should be used as the entrypoint on macOS. (macOS only)

Default: false
preserve_egg_dir boolean | string
Default: false
skip_pyc_compilation string | IfStatement | string | IfStatement[] | GlobDict | string | IfStatement | string | IfStatement[] | GlobDict[]

Skip compiling pyc for some files

Default:
[]
site_packages_path string | string | null

The path to the site-packages folder. This is advertised by Python to install noarch packages in the correct location. Only valid for a Python package.

Default: null
version_independent boolean | string

Whether the package is version independent or not. This is useful for 'abi3' packages that are OS specific, but not Python version specific.

Default: false
PythonTestElement object
python required

Python specific test configuration

All of: PythonTestElementInner object
PythonTestElementInner object
imports string | IfStatement | string | IfStatement[]

A list of Python imports to check after having installed the built package.

Default: null
pip_check boolean

Whether or not to run pip check during the Python tests.

Default: true
python_version string | string[] | null

Python version(s) to test against. If not specified, the default python version is used.

Default: null
RTestElement object
r required

R specific test configuration

All of: RTestElementInner object
RTestElementInner object
libraries string | IfStatement | string | IfStatement[] required

A list of R libraries to check after having installed the built package.

Requirements object
build string | IfStatement | string | IfStatement[] | null

Dependencies to install on the build platform architecture. Compilers, CMake, everything that needs to execute at build time.

Default: null
host string | IfStatement | string | IfStatement[] | null

Dependencies to install on the host platform architecture. All the packages that your build links against.

Default: null
run string | IfStatement | string | IfStatement[] | null

Dependencies that should be installed alongside this package. Dependencies in the host section with run_exports are also automatically added here.

Default: null
run_constraints string | IfStatement | string | IfStatement[] | null

constraints optional dependencies at runtime.

Default: null
run_exports string | IfStatement | string | IfStatement[] | RunExports

The run exports of this package

Default: null
ignore_run_exports IgnoreRunExports | null

Ignore run-exports by name or from certain packages

Default: null
RubyTestElement object
ruby required

Ruby specific test configuration

All of: RubyTestElementInner object
RubyTestElementInner object
requires string | IfStatement | string | IfStatement[] required

A list of Ruby modules to check after having installed the built package.

RunExports object
weak string | IfStatement | string | IfStatement[] | null

Weak run exports apply from the host env to the run env

Default: null
strong string | IfStatement | string | IfStatement[] | null

Strong run exports apply from the build and host env to the run env

Default: null
noarch string | IfStatement | string | IfStatement[] | null

Noarch run exports are the only ones looked at when building noarch packages

Default: null
weak_constraints string | IfStatement | string | IfStatement[] | null

Weak run constraints add run_constraints from the host env

Default: null
strong_constraints string | IfStatement | string | IfStatement[] | null

Strong run constraints add run_constraints from the build and host env

Default: null
ScriptTestElement object
script string | FileScript | ContentScript | string | IfStatement | string | IfStatement[]

A script to run to perform the test.

Default: null
requirements TestElementRequires | null

Additional dependencies to install before running the test.

Default: null
files TestElementFiles | null

Additional files to include for the test.

Default: null
SimplePackage object
name string required

The package name

version string required

The package version

SimpleRecipe object
package required

The package name and version.

All of: SimplePackage object
schema_version integer

The version of the YAML schema for a recipe. If the version is omitted it is assumed to be 1.

Default: 1
min=1max=1
context object | null

Defines arbitrary key-value pairs for Jinja interpolation

Default: null
source UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement_Union_UrlSource__GitRev__GitTag__GitBranch__BaseGitSource__LocalSource__ | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement_Union_UrlSource__GitRev__GitTag__GitBranch__BaseGitSource__LocalSource__[] | null

The source items to be downloaded and used for the build.

Default: null
build Build | null

Describes how the package should be build.

Default: null
about About | null

A human readable description of the package information

Default: null
extra object | null

An set of arbitrary values that are included in the package manifest

Default: null
tests ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement | ScriptTestElement | PythonTestElement | PerlTestElement | RTestElement | RubyTestElement | DownstreamTestElement | PackageContentTest | IfStatement[] | null

Tests to run after packaging

Default: null
requirements Requirements | null

The package dependencies

Default: null
StagingBuild object
script string | FileScript | ContentScript | string | IfStatement | string | IfStatement[] | null

The script to execute to invoke the staging build.

Default: null
StagingMeta object
name string required

Unique name for this staging cache.

minLength=1
StagingOutput object
staging required

Marks this output as a staging output with the given name.

All of: StagingMeta object
source UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement | UrlSource | GitRev | GitTag | GitBranch | BaseGitSource | LocalSource | IfStatement[] | null

The source items to be downloaded and used for the staging build.

Default: null
requirements StagingRequirements | null

The dependencies needed for the staging build.

Default: null
build StagingBuild | null

Build configuration for the staging output.

Default: null
StagingRequirements object
build string | IfStatement | string | IfStatement[] | null

Dependencies to install on the build platform architecture for the staging build.

Default: null
host string | IfStatement | string | IfStatement[] | null

Dependencies to install on the host platform architecture for the staging build.

Default: null
ignore_run_exports IgnoreRunExports | null

Ignore run-exports by name or from certain packages

Default: null
TestElementFiles object
source string | IfStatement | string | IfStatement[] | null

extra files from $SRC_DIR

Default: null
recipe string | IfStatement | string | IfStatement[] | null

extra files from $RECIPE_DIR

Default: null
TestElementRequires object
build string | IfStatement | string | IfStatement[] | null

extra requirements with build_platform architecture (emulators, ...)

Default: null
run string | IfStatement | string | IfStatement[] | null

extra run dependencies

Default: null
UrlSource object
url string | string[] required

Url pointing to the source tar.gz|zip|tar.bz2|... (this can be a list of mirrors that point to the same file)

patches string | string | IfStatement_Annotated_str__StringConstraints__[]

A list of patches to apply after fetching the source

Default:
[]
target_directory string | null

The location in the working directory to place the source

Default: null
sha256 string | string | null

The SHA256 hash of the source archive

Default: null
md5 string | string | null

The MD5 hash of the source archive

Default: null
file_name string | null

A file name to rename the downloaded file to (does not apply to archives).

Default: null
attestation AttestationConfig | null

Optional attestation verification configuration.

Default: null
Variant object
use_keys string | IfStatement | string | IfStatement[]

Keys to forcibly use for the variant computation (even if they are not in the dependencies)

Default:
[]
ignore_keys string | IfStatement | string | IfStatement[]

Keys to forcibly ignore for the variant computation (even if they are in the dependencies)

Default:
[]
down_prioritize_variant integer | string

used to prefer this variant less over other variants

Default: 0