mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 00:56:15 +02:00
b51e161af5
The old `std::variant` is bad because we aren't adding a new case to `FileIngestionMethod` so much as we are defining a separate concept --- store object content addressing rather than file system object content addressing. As such, it is more correct to just create a fresh enumeration. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
25 lines
531 B
C++
25 lines
531 B
C++
#pragma once
|
|
|
|
#include "source-path.hh"
|
|
#include "store-api.hh"
|
|
#include "file-system.hh"
|
|
#include "repair-flag.hh"
|
|
#include "file-content-address.hh"
|
|
|
|
namespace nix {
|
|
|
|
enum struct FetchMode { DryRun, Copy };
|
|
|
|
/**
|
|
* Copy the `path` to the Nix store.
|
|
*/
|
|
StorePath fetchToStore(
|
|
Store & store,
|
|
const SourcePath & path,
|
|
FetchMode mode,
|
|
std::string_view name = "source",
|
|
ContentAddressMethod method = ContentAddressMethod::Raw::NixArchive,
|
|
PathFilter * filter = nullptr,
|
|
RepairFlag repair = NoRepair);
|
|
|
|
}
|