diff options
Diffstat (limited to 'src/libexpr/primops/fetchGit.hh')
-rw-r--r-- | src/libexpr/primops/fetchGit.hh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libexpr/primops/fetchGit.hh b/src/libexpr/primops/fetchGit.hh new file mode 100644 index 000000000..fe2b49942 --- /dev/null +++ b/src/libexpr/primops/fetchGit.hh @@ -0,0 +1,32 @@ +#pragma once + +#include "store-api.hh" + +#include <regex> + +namespace nix { + +struct GitInfo +{ + Path storePath; + std::optional<std::string> ref; + Hash rev{htSHA1}; + std::optional<uint64_t> revCount; + time_t lastModified; +}; + +GitInfo exportGit( + ref<Store> store, + std::string uri, + std::optional<std::string> ref, + std::optional<Hash> rev, + const std::string & name); + +GitInfo exportGitHub( + ref<Store> store, + const std::string & owner, + const std::string & repo, + std::optional<std::string> ref, + std::optional<Hash> rev); + +} |