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

Method Installables

internal/devpkg/package.go:262–285  ·  view source on GitHub ↗

Installables for this package. Installables is a nix concept defined here: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html#installables

()

Source from the content-addressed store, hash-verified

260// Installables for this package. Installables is a nix concept defined here:
261// https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html#installables
262func (p *Package) Installables() ([]string, error) {
263 outputNames, err := p.GetOutputNames()
264 if err != nil {
265 return nil, err
266 }
267 installables := []string{}
268 for _, outputName := range outputNames {
269 i, err := p.InstallableForOutput(outputName)
270 if err != nil {
271 return nil, err
272 }
273 installables = append(installables, i)
274 }
275 if len(installables) == 0 {
276 // This means that the package is not in the binary cache
277 // OR it is a flake (??)
278 installable, err := p.urlForInstall()
279 if err != nil {
280 return nil, err
281 }
282 return []string{installable}, nil
283 }
284 return installables, nil
285}
286
287func (p *Package) InstallableForOutput(output string) (string, error) {
288 inCache, err := p.IsOutputInBinaryCache(output)

Callers 4

GetStorePathsMethod · 0.95
FixMissingStorePathsMethod · 0.80
UploadProjectToCacheMethod · 0.80

Calls 3

GetOutputNamesMethod · 0.95
InstallableForOutputMethod · 0.95
urlForInstallMethod · 0.95

Tested by

no test coverage detected