diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-09-18 14:10:45 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-09-18 14:10:45 +0200 |
commit | 2bcf8cbe7a36ebcd2ad27b4df18fdb911d7ab224 (patch) | |
tree | 52e47651c75023c4a0208dde3ceb3974d3a4d7c8 /src/libfetchers/github.cc | |
parent | 649d3aaf2481b928120b6ce77d68b1b7c68f69e6 (diff) |
libfetchers/github: allow `url` attribute
Since 108debef6f703aa3ca1f6d6c45428880624ec6f8 we allow a
`url`-attribute for the `github`-fetcher to fetch tarballs from
self-hosted `gitlab`/`github` instances.
However it's not used when defining e.g. a flake-input
foobar = {
type = "github";
url = "gitlab.myserver";
/* ... */
}
and breaks with an evaluation-error:
error: --- Error --------------------------------------nix
unsupported input attribute 'url'
(use '--show-trace' to show detailed location information)
This patch allows flake-inputs to be fetched from self-hosted instances
as well.
Diffstat (limited to 'src/libfetchers/github.cc')
-rw-r--r-- | src/libfetchers/github.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index 1cc0c5e2e..f510ae5f5 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -77,7 +77,7 @@ struct GitArchiveInputScheme : InputScheme if (maybeGetStrAttr(attrs, "type") != type()) return {}; for (auto & [name, value] : attrs) - if (name != "type" && name != "owner" && name != "repo" && name != "ref" && name != "rev" && name != "narHash" && name != "lastModified") + if (name != "type" && name != "owner" && name != "repo" && name != "ref" && name != "rev" && name != "narHash" && name != "lastModified" && name != "url") throw Error("unsupported input attribute '%s'", name); getStrAttr(attrs, "owner"); |