packagekit

package
v0.2026258.1713 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 19 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchMap

func ArchMap(format, goarch string) string

ArchMap returns the nFPM arch name for a GOARCH name + format.

func Build

func Build(pkg *spec.Packaging, opts BuildOptions) ([]string, error)

Build builds the requested formats for one (variant, arch) and returns the written package file paths. Formats defaults to all registered nFPM formats.

func BuildInfo

func BuildInfo(pkg *spec.Packaging, format string, opts BuildOptions) (*nfpm.Info, error)

BuildInfo constructs the nfpm.Info for one (format, variant) from the packaging section + the build options. A variant naming a plugin absent from the plugins dir fails loudly (R4 — never a silently-dropped plugin).

func InjectOptDepends

func InjectOptDepends(path string, optDepends map[string]string) error

InjectOptDepends rewrites a .pkg.tar.zst in place, injecting the optdepends into its .PKGINFO. A no-op when optDepends is empty.

func LoadPackaging

func LoadPackaging(path string) (*spec.Packaging, error)

LoadPackaging reads the `packaging:` section from a charly.yml on disk.

func ParsePackaging

func ParsePackaging(data []byte) (*spec.Packaging, error)

ParsePackaging parses the `packaging:` section from charly.yml bytes. A candy charly.yml is `candy-name: {candy: {…}}` — the candy name is dynamic, so the parser walks the top-level keys and returns the first `candy.packaging` block.

func ResolveVariant

func ResolveVariant(pkg *spec.Packaging, format, variant string) (name string, plugins []string, err error)

ResolveVariant returns the package name + the variant's plugin list for a (format, variant) pair. variant == "" selects the format's default variant.

func VariantNames

func VariantNames(pkg *spec.Packaging, format string) []string

VariantNames returns the sorted variant names for a format (the default variant first). Used by the distro workflows to loop over variants.

Types

type BuildOptions

type BuildOptions struct {
	Binary     string   // the charly binary to package
	PluginsDir string   // the plugins dir to package
	Version    string   // the CalVer
	Arch       string   // GOARCH name (amd64/arm64)
	Variant    string   // the variant name ("" = the format's default)
	Formats    []string // the nFPM formats to build
	Out        string   // the output dir
	SigningKey string   // deb/rpm GPG key file (passphrase via NFPM_PASSPHRASE)
	APKKey     string   // apk RSA key file (passphrase via NFPM_APK_PASSPHRASE)
	MSIXPFX    string   // msix PFX cert file (passphrase via NFPM_MSIX_PASSPHRASE)
}

BuildOptions is the input to a package build: the binary + plugins to package, the version/arch/variant, the formats, and the signing keys.

Jump to

Keyboard shortcuts

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