aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-09-18 14:10:45 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2020-09-18 14:10:45 +0200
commit2bcf8cbe7a36ebcd2ad27b4df18fdb911d7ab224 (patch)
tree52e47651c75023c4a0208dde3ceb3974d3a4d7c8 /src/libfetchers
parent649d3aaf2481b928120b6ce77d68b1b7c68f69e6 (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')
-rw-r--r--src/libfetchers/github.cc2
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");