ensureNixpkgsPrefetched should be called via the public EnsureNixpkgsPrefetched. See function comment there.
(w io.Writer)
| 537 | // ensureNixpkgsPrefetched should be called via the public EnsureNixpkgsPrefetched. |
| 538 | // See function comment there. |
| 539 | func (p *Package) ensureNixpkgsPrefetched(w io.Writer) error { |
| 540 | inCache, err := p.IsInBinaryCache() |
| 541 | if err != nil { |
| 542 | return err |
| 543 | } |
| 544 | if inCache { |
| 545 | // We can skip prefetching nixpkgs, if this package is in the binary |
| 546 | // cache store. |
| 547 | return nil |
| 548 | } |
| 549 | |
| 550 | hash := p.HashFromNixPkgsURL() |
| 551 | if hash == "" { |
| 552 | return nil |
| 553 | } |
| 554 | return nix.EnsureNixpkgsPrefetched(w, hash) |
| 555 | } |
| 556 | |
| 557 | // version returns the version of the package |
| 558 | // it only applies to devbox packages |
no test coverage detected