1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

Support building flakes from a shallow Git repo

Fixes #3756.
This commit is contained in:
Eelco Dolstra 2020-07-01 14:57:59 +02:00
parent 26cf0c674f
commit 7d554f295c
2 changed files with 5 additions and 0 deletions

View file

@ -42,6 +42,8 @@ struct GitInputScheme : InputScheme
for (auto &[name, value] : url.query) {
if (name == "rev" || name == "ref")
attrs.emplace(name, value);
else if (name == "shallow")
attrs.emplace(name, Explicit<bool> { value == "1" });
else
url2.query.emplace(name, value);
}