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

Method NormalizedPackageAttributePath

internal/devpkg/package.go:370–380  ·  view source on GitHub ↗

NormalizedPackageAttributePath returns an attribute path normalized by nix search. This is useful for comparing different attribute paths that may point to the same package. Note, it may be an expensive call.

()

Source from the content-addressed store, hash-verified

368// search. This is useful for comparing different attribute paths that may
369// point to the same package. Note, it may be an expensive call.
370func (p *Package) NormalizedPackageAttributePath() (string, error) {
371 if p.normalizedPackageAttributePathCache != "" {
372 return p.normalizedPackageAttributePathCache, nil
373 }
374 path, err := p.normalizePackageAttributePath()
375 if err != nil {
376 return path, err
377 }
378 p.normalizedPackageAttributePathCache = path
379 return p.normalizedPackageAttributePathCache, nil
380}
381
382// normalizePackageAttributePath calls nix search to find the normalized attribute
383// path. It may be an expensive call (~100ms).

Callers 3

EqualsMethod · 0.95
ValidateExistsMethod · 0.95

Calls 1

Tested by

no test coverage detected