nixbuilder

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NB

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

NB acts as a wrapper for github.com/benchkram/bob/pkg/nix package and is used for building tasks dependencies

func New

func New(opts ...NixOption) *NB

NewNB instantiates a new Nix builder instance

func (*NB) BuildDependencies

func (n *NB) BuildDependencies(deps []nix.Dependency) error

BuildDependencies builds the list of all nix deps

func (*NB) BuildEnvironment

func (n *NB) BuildEnvironment(deps []nix.Dependency, nixpkgs string) (_ []string, err error)

BuildEnvironment builds the environment with all nix deps

func (*NB) BuildNixDependencies

func (n *NB) BuildNixDependencies(ag *bobfile.Bobfile, buildTasksInPipeline, runTasksInPipeline []string) (err error)

BuildNixDependencies builds nix dependencies and prepares the affected tasks by setting the store paths on each task in the given aggregate.

func (*NB) BuildNixDependenciesInPipeline

func (n *NB) BuildNixDependenciesInPipeline(ag *bobfile.Bobfile, taskName string) (err error)

BuildNixDependenciesInPipeline collects and builds nix-dependencies for a pipeline starting at taskName.

func (*NB) Clean

func (n *NB) Clean() (err error)

Clean removes all cached nix dependencies

func (*NB) CleanNixShellCache

func (n *NB) CleanNixShellCache() (err error)

CleanNixShellCache removes all cached nix-shell --command='env' output

func (*NB) EnvStore

func (n *NB) EnvStore() envutil.Store

type NixOption

type NixOption func(n *NB)

func WithCache

func WithCache(cache *nix.Cache) NixOption

func WithEnvironmentStore

func WithEnvironmentStore(store envutil.Store) NixOption

func WithShellCache

func WithShellCache(cache *nix.ShellCache) NixOption

Jump to

Keyboard shortcuts

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