From fe79b4509dd580542fa28186673826df603677bb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 12 May 2024 21:29:56 +0200 Subject: feat: enable using channel URLs if unable to resolve via NIX_PATH --- internal/importer/channel.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/importer/channel.go') diff --git a/internal/importer/channel.go b/internal/importer/channel.go index 97f0a27..70aa9de 100644 --- a/internal/importer/channel.go +++ b/internal/importer/channel.go @@ -45,6 +45,10 @@ func (i *ChannelImporter) FetchIfNeeded(parent context.Context) (bool, error) { dest, } + if i.Source.URL != "" { + args = append(args, "-I", fmt.Sprintf("%s=%s", i.Source.Channel, i.Source.URL)) + } + i.Logger.Debug("nix-build command", "args", args) cmd := exec.CommandContext(ctx, "nix-build", args...) out, err := cmd.Output() -- cgit 1.4.1