From cf740051391846cafe14e62ce8590be97e396512 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 15 Jan 2023 02:06:51 +0000 Subject: [PATCH] nixstore: no . Derivers --- go/nix/nixstore/remotestore.go | 3 +++ go/nix/nixstore/sqlitestore.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/go/nix/nixstore/remotestore.go b/go/nix/nixstore/remotestore.go index 04734c316d..250f489ca9 100644 --- a/go/nix/nixstore/remotestore.go +++ b/go/nix/nixstore/remotestore.go @@ -62,6 +62,9 @@ func (d *Daemon) NARInfo(storePath string) (*narinfo.NarInfo, error) { return nil, fmt.Errorf("reading deriver: %w", err) } ni.Deriver = path.Base(ni.Deriver) + if ni.Deriver == "." { + ni.Deriver = "" + } hashStr, err := d.r.ReadString() if err != nil { diff --git a/go/nix/nixstore/sqlitestore.go b/go/nix/nixstore/sqlitestore.go index e605824e68..3e409df1d3 100644 --- a/go/nix/nixstore/sqlitestore.go +++ b/go/nix/nixstore/sqlitestore.go @@ -64,6 +64,9 @@ WHERE 1=1 if deriverStr != nil { ni.Deriver = path.Base(*deriverStr) } + if ni.Deriver == "." { + ni.Deriver = "" + } if sigsStr != nil { sigsBits := strings.Fields(*sigsStr)