make fetchgit work when not fetching from master

This is required so that fetching dependencies from a feature branch is
possible.

See also https://github.com/NixOS/nix/pull/3408
This commit is contained in:
Léo Gaspard 2021-01-14 11:18:35 +01:00 committed by Nicolas Mattia
parent 79a613f3b5
commit 79129b5c16

View file

@ -108,6 +108,7 @@ rec
url = val.git;
} // lib.optionalAttrs (val ? rev) {
rev = val.rev;
ref = val.rev;
} // lib.optionalAttrs (val ? branch) {
ref = val.branch;
} // lib.optionalAttrs (val ? tag) {