StoreName returns the last section of the store path. Example: nix/store/abc123-foo-1.0.0 -> foo-1.0.0 Warning, this is probably slowish. If you need to call this multiple times, consider caching the result.
()
| 632 | // Warning, this is probably slowish. If you need to call this multiple times, |
| 633 | // consider caching the result. |
| 634 | func (p *Package) StoreName() (string, error) { |
| 635 | u, err := p.urlForInstall() |
| 636 | if err != nil { |
| 637 | return "", err |
| 638 | } |
| 639 | name, err := nix.EvalPackageName(u) |
| 640 | if err != nil { |
| 641 | return "", err |
| 642 | } |
| 643 | return name, nil |
| 644 | } |
| 645 | |
| 646 | func (p *Package) EnsureUninstallableIsInLockfile() error { |
| 647 | // TODO savil: Should !p.isInstallable() be the opposite i.e. p.IsInstallable()? |
no test coverage detected