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

Function newFlakePlan

internal/shellgen/flake_plan.go:29–53  ·  view source on GitHub ↗
(ctx context.Context, devbox devboxer)

Source from the content-addressed store, hash-verified

27}
28
29func newFlakePlan(ctx context.Context, devbox devboxer) (*flakePlan, error) {
30 ctx, task := trace.NewTask(ctx, "devboxFlakePlan")
31 defer task.End()
32
33 for _, pluginConfig := range devbox.Config().IncludedPluginConfigs() {
34 if err := devbox.PluginManager().CreateFilesForConfig(pluginConfig); err != nil {
35 return nil, err
36 }
37 }
38
39 packages := devbox.InstallablePackages()
40
41 // Fill the NarInfo Cache concurrently as a perf-optimization, prior to invoking
42 // IsInBinaryCache in flakeInputs() and in the flake.nix template.
43 if err := devpkg.FillNarInfoCache(ctx, packages...); err != nil {
44 return nil, err
45 }
46
47 return &flakePlan{
48 FlakeInputs: flakeInputs(ctx, packages),
49 Stdenv: devbox.Lockfile().Stdenv(),
50 Packages: packages,
51 System: nix.System(),
52 }, nil
53}
54
55func (f *flakePlan) needsGlibcPatch() bool {
56 for _, in := range f.FlakeInputs {

Callers 1

GenerateForPrintEnvFunction · 0.85

Calls 11

FillNarInfoCacheFunction · 0.92
SystemFunction · 0.92
flakeInputsFunction · 0.85
EndMethod · 0.80
IncludedPluginConfigsMethod · 0.80
CreateFilesForConfigMethod · 0.80
ConfigMethod · 0.65
PluginManagerMethod · 0.65
InstallablePackagesMethod · 0.65
StdenvMethod · 0.65
LockfileMethod · 0.65

Tested by

no test coverage detected