stdenv

package
v0.0.0-...-f4b31ea Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg *Config) error

Initialize the stdenv. If finder is nil, binaries will be imported from PATH.

Types

type Config

type Config struct {
	XcodeDeveloper generators.Generator
	WinSDK         generators.Generator
	BuildPlatform  generators.Platform

	// If true, pull docker image(s) during Init. Docker may require gcloud and
	// other credentials to access private repositories, which are not available
	// inside the derivation.
	DockerPullImage bool

	// For mock testing. Required binaries may not available in test environment.
	FindBinary generators.FindBinaryFunc
}

func DefaultConfig

func DefaultConfig() *Config

type Generator

type Generator struct {
	Name         string
	Source       Source
	Env          environ.Env
	Dependencies []generators.Dependency

	CIPD *core.Action_Metadata_CIPD
}

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, plats generators.Platforms) (*core.Action, error)

type Source

type Source interface {
	// contains filtered or unexported methods
}

type SourceGit

type SourceGit struct {
	// The url to the git repository. Support any protocol used by the git
	// command line interfaces.
	URL string

	// The reference for the git repo. Can be anything supported by git checkout.
	// Typical use cases:
	// - refs/tags/xxx
	// - 8e8722e14772727b0e1cd5bd925a0f089611a60b
	Ref string

	CIPDName string
	Version  string
}

type SourceURL

type SourceURL struct {
	URL           string
	Filename      string
	HashAlgorithm core.HashAlgorithm
	HashValue     string
}

type SourceURLs

type SourceURLs struct {
	URLs []SourceURL

	CIPDName string
	Version  string
}

Jump to

Keyboard shortcuts

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