Support submodules for fetchTree #19

Closed
timothyklim wants to merge 1 commit from master into master

View file

@ -25,10 +25,11 @@ let
}
else if info.type == "git" then
{ outPath =
builtins.fetchGit
({ url = info.url; }
builtins.fetchTree
({ inherit (info) type url; }
// (if info ? rev then { inherit (info) rev; } else {})
edolstra commented 2022-02-25 10:24:13 +00:00 (Migrated from github.com)
Review

We shouldn't use fetchTree because it's an experimental feature and is not available in older versions of Nix (so using it would kind of negate the point of flake-compat).

We shouldn't use `fetchTree` because it's an experimental feature and is not available in older versions of Nix (so using it would kind of negate the point of `flake-compat`).
// (if info ? ref then { inherit (info) ref; } else {})
// (if info ? submodules then { inherit (info) submodules; } else {})
);
lastModified = info.lastModified;
lastModifiedDate = formatSecondsSinceEpoch info.lastModified;