homebrew

package
v0.0.0-...-a0b8de0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ReceiptJson = "INSTALL_RECEIPT.json"

Variables

View Source
var (
	MacOSVersion    string
	RequireCodeSign bool
)

Functions

func DefaultCellar

func DefaultCellar() string

func LinkTree

func LinkTree(targetRoot, root string) error

Types

type Binary

type Binary struct {
	System   System   `json:"system"`
	Checksum Checksum `json:"checksum"`
	Options  *Options `json:"options"`
}

type Checksum

type Checksum struct {
	Sha256 string `json:"sha256"`
}

func (*Checksum) Matches

func (c *Checksum) Matches(h hash.Hash) bool

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

func (*Downloader) Prep

func (d *Downloader) Prep(urls []PackageURL) (int64, error)

func (*Downloader) Size

func (d *Downloader) Size(url string) (int64, bool)

func (*Downloader) Stage

func (d *Downloader) Stage(dir string, urls []PackageURL) (map[string]string, error)

func (*Downloader) Test

func (d *Downloader) Test(url string) (int64, error)

type HomebrewRelocator

type HomebrewRelocator struct {
	Cellar string
}

func (*HomebrewRelocator) Relocate

func (h *HomebrewRelocator) Relocate(pkg *ResolvedPackage, root string) error

type InstallReceipt

type InstallReceipt struct {
	ChangedFiles []string `json:"changed_files"`
}

type InstallablePackage

type InstallablePackage struct {
	// contains filtered or unexported fields
}

func (*InstallablePackage) DependencyNames

func (i *InstallablePackage) DependencyNames() []string

func (*InstallablePackage) Install

func (i *InstallablePackage) Install(tmpdir string) error

func (*InstallablePackage) Name

func (i *InstallablePackage) Name() string

func (*InstallablePackage) Version

func (i *InstallablePackage) Version() string

type License

type License struct {
	Name  string     `json:"name,omitempty"`
	With  *License   `json:"with,omitempty"`
	AnyOf []*License `json:"any_of,omitempty"`
	AllOf []*License `json:"all_of,omitempty"`
}

type Manifest

type Manifest struct {
	Manifests []struct {
		Annotations struct {
			Digest string `json:"sh.brew.bottle.digest"`
			Tab    string `json:"sh.brew.tab"`
		} `json:"annotations"`
	} `json:"manifests"`
}

type Options

type Options struct {
	SkipRelocation bool   `json:"skip_relocation"`
	InstallPath    string `json:"install_path"`
}

type Package

type Package struct {
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	Url          string    `json:"url"`
	Version      string    `json:"version"`
	License      *License  `json:"license"`
	Checksum     *Checksum `json:"checksum"`
	Dependencies []string  `json:"dependencies"`
	Binaries     []*Binary `json:"binaries"`

	Path string
}

type PackageURL

type PackageURL struct {
	URL      string
	Checksum *Checksum
	Binary   *Binary
}

type Resolution

type Resolution struct {
	Cellar    string
	ToInstall []*ResolvedPackage
}

func (*Resolution) ComputeURLs

func (r *Resolution) ComputeURLs() ([]PackageURL, error)

func (*Resolution) Explain

func (r *Resolution) Explain(w io.Writer, d *Downloader) error

func (*Resolution) PruneInstalled

func (r *Resolution) PruneInstalled()

type ResolvedPackage

type ResolvedPackage struct {
	Package

	Installed        bool
	IncludedBy       []*ResolvedPackage
	IncludedByNames  []string
	DepedentPackages []*ResolvedPackage
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(cellar, path string) (*Resolver, error)

func (*Resolver) Add

func (r *Resolver) Add(name string) error

func (*Resolver) Resolve

func (r *Resolver) Resolve() (*Resolution, error)

type RuntimeDep

type RuntimeDep struct {
	FullName string `json:"full_name"`
	Version  string `json:"version"`
}

type System

type System struct {
	Os      string `json:"os"`
	Version string `json:"version"`
	Arch    string `json:"arch"`
}

type Tab

type Tab struct {
	Version      string        `json:"homebrew_version"`
	ChangedFiles []string      `json:"changed_files"`
	ModTime      int64         `json:"source_modified_time"`
	Compiler     string        `json:"compiler"`
	Arch         string        `json:"arch"`
	RuntimeDeps  []*RuntimeDep `json:"runtime_dependencies"`

	BuiltOn struct {
		OS        string `json:"os"`
		OSVersion string `json:"os_version"`
		CPU       string `json:"cpu_family"`
		XCode     string `json:"xcode"`
		CLT       string `json:"clt"`
	} `json:"built_on"`
}

func FetchTab

func FetchTab(cellar string, pkg *ResolvedPackage) (*Tab, error)

type Unpacker

type Unpacker struct {
	// contains filtered or unexported fields
}

func NewUnpacker

func NewUnpacker(root string) (*Unpacker, error)

func (*Unpacker) Unpack

func (u *Unpacker) Unpack(pkg *ResolvedPackage, bin *Binary, path string) (string, error)

Jump to

Keyboard shortcuts

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