TODO: We should improve a few issues with this function: * It shared the same name as Devbox.Stdenv() which is confusing. * Since File implements DevboxProject, IDEs really struggle to accurately find call sites. (side note, we should remove DevboxProject interface) * This function forces a resoluti
()
| 159 | // chance to "prep" the user for some waiting. |
| 160 | // * Should we rename to Nixpkgs() ? Stdenv feels a bit ambiguous. |
| 161 | func (f *File) Stdenv() flake.Ref { |
| 162 | unlocked := f.devboxProject.Stdenv() |
| 163 | pkg, err := f.Resolve(unlocked.String()) |
| 164 | if err != nil { |
| 165 | return unlocked |
| 166 | } |
| 167 | ref, err := flake.ParseRef(pkg.Resolved) |
| 168 | if err != nil { |
| 169 | return unlocked |
| 170 | } |
| 171 | return ref |
| 172 | } |
| 173 | |
| 174 | func (f *File) Get(pkg string) *Package { |
| 175 | entry, hasEntry := f.Packages[pkg] |