nixstore

package
v0.0.0-...-b872246 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package nixstore queries and resolves Nix store packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	fs.FS

	// StoreName is the full name of the package within its store.
	StoreName string

	// Hash is the package's base-32 Nix store hash.
	Hash string

	// DirectDependencies are the other packages in the store that this
	// package depends on. It does not contain transitive dependencies.
	DirectDependencies []*Package
}

Package is a file system that contains a package's files and metadata.

func TopologicalSort

func TopologicalSort(pkg *Package) []*Package

TopologicalSort resolves the dependency tree for a package and returns it as a slice of packages in topological order.

func (Package) String

func (p Package) String() string

type Root

type Root struct {
	fs.FS
	// contains filtered or unexported fields
}

Root is the top-level directory of a Nix store. It maintains an index of packages for fast lookup and dependency resolution.

func Local

func Local(path string) (*Root, error)

Local returns a local file system Nix store, which is typically /nix/store.

func (*Root) Package

func (r *Root) Package(name string) (*Package, error)

Package retrieves a package by its name within the store. The name must be the fully unique directory name following the pattern <nixhash>-<name>.

Jump to

Keyboard shortcuts

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