Package

The package command is a top-level (file) command. It’s used to define packages and add buildfile-scoped repositories.

package define

With package define "name", one defines a new package. This definition is used when wanting to publish any given target.

Arguments
# Name Type Info
0 define sym

The symbol "define".

1 name str

Name of the package

Expanded?: ✅

vendor

Adds informations about the vendor.

Arguments
# Name Type Info
0 value str

The vendor information

Expanded?: ✅

versions

List of versions this should be allowed to be build for.

Arguments
# Name Type Info
0 values str[]

List of allowed versions

depData

List of keys the that should be extracted of the targets datastore to put into the package for later reuse.

Arguments
# Name Type Info
0 keys str[]

List of keys to copy

files

List of files to be included in the package.

Each entry can have one of the following forms:

  • name::path
  • name::mode://path
  • path
  • mode://path

Where name is the name inside the archive, mode can either be build or out, and path is the path itself!

Arguments
# Name Type Info
0 keys str[]

List of files to copy

target

Target that provides artifacts for the package. Takes a block which contains set_opt and set_data commands.

Arguments
# Name Type Info
0 keys str

The target to use

Expanded?: ❌

set_opt

Sets an option for an target; requires that the option is defined and applied to the target.

Arguments
# Name Type Info
0 option str Expanded?: ✅

set_data

See set_data.

package add_repo

This command adds a new buildfile-local repository.

Example:

package add_repo myrepo {
    src "https://yyy"
    bin "https://zzz"
}
Arguments
# Name Type Info
0 add_repo sym

The symbol "add_repo".

1 name sym

Name of the repository; cannot start with "local".

src

Sets the source location for a git repository.

Arguments
# Name Type Info
0 url str Expanded?: ✅

bin

Sets the source location for a binary package repository.

Arguments
# Name Type Info
0 url str Expanded?: ✅