1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Remove tarball-cache.{hh,cc}

TarballInfo is only used in github.cc, and getTarballCache() is a bit
too trivial to have its own file.
This commit is contained in:
Eelco Dolstra 2024-02-15 21:58:08 +01:00
parent 9b04ce16fc
commit 78b8db72b5
5 changed files with 15 additions and 31 deletions

View file

@ -10,7 +10,6 @@
#include "tarball.hh"
#include "tarfile.hh"
#include "git-utils.hh"
#include "tarball-cache.hh"
#include <optional>
#include <nlohmann/json.hpp>
@ -193,6 +192,12 @@ struct GitArchiveInputScheme : InputScheme
virtual DownloadUrl getDownloadUrl(const Input & input) const = 0;
struct TarballInfo
{
Hash treeHash;
time_t lastModified;
};
std::pair<Input, TarballInfo> downloadArchive(ref<Store> store, Input input) const
{
if (!maybeGetStrAttr(input.attrs, "ref")) input.attrs.insert_or_assign("ref", "HEAD");