Skip to content

[easy] remove unused devpkg.StoreName function #1317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions internal/devpkg/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,19 +530,3 @@ func (p *Package) ContentAddressedPath() (string, error) {
func (p *Package) AllowInsecure() bool {
return p.lockfile.Get(p.Raw).IsAllowInsecure()
}

// 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.
func (p *Package) StoreName() (string, error) {
u, err := p.urlForInstall()
if err != nil {
return "", err
}
name, err := nix.EvalPackageName(u)
if err != nil {
return "", err
}
return name, nil
}