MCPcopy Index your code
hub / github.com/jetify-com/devbox / InputAddressedPaths

Method InputAddressedPaths

internal/devpkg/package.go:577–602  ·  view source on GitHub ↗

InputAddressedPaths is the input-addressed path in /nix/store It is also the key in the BinaryCache for this package

()

Source from the content-addressed store, hash-verified

575// InputAddressedPaths is the input-addressed path in /nix/store
576// It is also the key in the BinaryCache for this package
577func (p *Package) InputAddressedPaths() ([]string, error) {
578 if inCache, err := p.IsInBinaryCache(); err != nil {
579 return nil, err
580 } else if !inCache {
581 return nil,
582 errors.Errorf("Package %q cannot be fetched from binary cache store", p.Raw)
583 }
584
585 entry, err := p.lockfile.Resolve(p.LockfileKey())
586 if err != nil {
587 return nil, err
588 }
589
590 sysInfo := entry.Systems[nix.System()]
591 outputs := sysInfo.DefaultOutputs()
592
593 paths := []string{}
594 for _, output := range outputs {
595 p, err := p.InputAddressedPathForOutput(output.Name)
596 if err != nil {
597 return nil, err
598 }
599 paths = append(paths, p)
600 }
601 return paths, nil
602}
603
604func (p *Package) InputAddressedPathForOutput(output string) (string, error) {
605 if inCache, err := p.IsInBinaryCache(); err != nil {

Callers 2

MatchesMethod · 0.80
fetchClosureExprMethod · 0.80

Calls 6

IsInBinaryCacheMethod · 0.95
LockfileKeyMethod · 0.95
SystemFunction · 0.92
DefaultOutputsMethod · 0.80
ResolveMethod · 0.65

Tested by

no test coverage detected