diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/config/config.go | 5 | ||||
-rw-r--r-- | internal/importer/channel.go | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 55f5efa..9880b3a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -48,6 +48,7 @@ var defaultConfig = Config{ Enable: true, Type: importer.Channel, Channel: "nixpkgs", + URL: "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz", ImportPath: "nixos/release.nix", Attribute: "options", OutputPath: "share/doc/nixos/options.json", @@ -64,7 +65,8 @@ var defaultConfig = Config{ Key: "darwin", Enable: false, Type: importer.Channel, - Channel: "nix-darwin", + Channel: "darwin", + URL: "https://github.com/LnL7/nix-darwin/archive/master.tar.gz", ImportPath: "release.nix", Attribute: "options", OutputPath: "share/doc/darwin/options.json", @@ -81,6 +83,7 @@ var defaultConfig = Config{ Key: "home-manager", Enable: false, Channel: "home-manager", + URL: "https://github.com/nix-community/home-manager/archive/master.tar.gz", Type: importer.Channel, ImportPath: "default.nix", Attribute: "docs.json", 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() |