nixstore: no . Derivers

This commit is contained in:
Luke Granger-Brown 2023-01-15 02:06:51 +00:00
parent 32bb40df77
commit cf74005139
2 changed files with 6 additions and 0 deletions

View file

@ -62,6 +62,9 @@ func (d *Daemon) NARInfo(storePath string) (*narinfo.NarInfo, error) {
return nil, fmt.Errorf("reading deriver: %w", err) return nil, fmt.Errorf("reading deriver: %w", err)
} }
ni.Deriver = path.Base(ni.Deriver) ni.Deriver = path.Base(ni.Deriver)
if ni.Deriver == "." {
ni.Deriver = ""
}
hashStr, err := d.r.ReadString() hashStr, err := d.r.ReadString()
if err != nil { if err != nil {

View file

@ -64,6 +64,9 @@ WHERE 1=1
if deriverStr != nil { if deriverStr != nil {
ni.Deriver = path.Base(*deriverStr) ni.Deriver = path.Base(*deriverStr)
} }
if ni.Deriver == "." {
ni.Deriver = ""
}
if sigsStr != nil { if sigsStr != nil {
sigsBits := strings.Fields(*sigsStr) sigsBits := strings.Fields(*sigsStr)