mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Move BinaryCacheStore / LocalBinaryCacheStore from Hydra
So you can now do: $ NIX_REMOTE=file:///tmp/binary-cache nix-store -qR /nix/store/...
This commit is contained in:
parent
b584a0e7de
commit
263187a2ec
7 changed files with 658 additions and 5 deletions
31
src/libstore/local-binary-cache-store.hh
Normal file
31
src/libstore/local-binary-cache-store.hh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include "binary-cache-store.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
class LocalBinaryCacheStore : public BinaryCacheStore
|
||||
{
|
||||
private:
|
||||
|
||||
Path binaryCacheDir;
|
||||
|
||||
public:
|
||||
|
||||
LocalBinaryCacheStore(std::shared_ptr<Store> localStore,
|
||||
const Path & secretKeyFile, const Path & publicKeyFile,
|
||||
const Path & binaryCacheDir);
|
||||
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
|
||||
bool fileExists(const std::string & path) override;
|
||||
|
||||
void upsertFile(const std::string & path, const std::string & data) override;
|
||||
|
||||
std::string getFile(const std::string & path) override;
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue