lix/src/libexpr/primops/fetchGit.hh

33 lines
569 B
C++
Raw Normal View History

2018-11-29 18:18:36 +00:00
#pragma once
#include "store-api.hh"
#include <regex>
namespace nix {
struct GitInfo
{
Path storePath;
std::optional<std::string> ref;
2019-04-19 09:34:23 +00:00
Hash rev{htSHA1};
std::optional<uint64_t> revCount;
time_t lastModified;
2018-11-29 18:18:36 +00:00
};
GitInfo exportGit(
ref<Store> store,
std::string uri,
2019-04-19 09:34:23 +00:00
std::optional<std::string> ref,
std::optional<Hash> rev,
2018-11-29 18:18:36 +00:00
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);
2018-11-29 18:18:36 +00:00
}