config

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package config computes the on-disk workspace layout for a build. The build tree is keyed on the *target* platform+arch so a cross build (eg. Windows) gets its own directories and never collides with a native build of the same package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgxDir

func PkgxDir() string

PkgxDir returns the pkgx prefix ($PKGX_DIR, else ~/.pkgx).

Types

type Paths

type Paths struct {
	Home         string // a fresh HOME for the build (== bkroot for the default layout)
	Src          string // extracted sources
	Build        string // where the build runs
	Test         string // where tests stage and run
	TarballDir   string // where downloaded source tarballs are cached
	Install      string // final install prefix: $PKGX_DIR/<project>/v<version>
	BuildInstall string // staging prefix the build writes to: <Install>+brewing
}

Paths is the set of directories a build uses.

func Compute

func Compute(project, version string, tgt target.Target) Paths

Compute lays out the build directories for project@version built for tgt.

When PKGX_PANTRY_DIR (or the older PKGX_PANTRY_PATH) is set, the workspace is rooted under that checkout (homes/srcs/builds/testbeds), matching brewkit's in-pantry layout; otherwise it lives under the XDG data home, keyed on the target platform+arch.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL