Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
misc-store-flags.hh
Go to the documentation of this file.
1#pragma once
3
4#include "nix/util/args.hh"
6
7namespace nix::flag {
8
9Args::Flag hashAlgo(std::string && longName, HashAlgorithm * ha);
10
11static inline Args::Flag hashAlgo(HashAlgorithm * ha)
12{
13 return hashAlgo("hash-algo", ha);
14}
15
16Args::Flag hashAlgoOpt(std::string && longName, std::optional<HashAlgorithm> * oha);
17Args::Flag hashFormatWithDefault(std::string && longName, HashFormat * hf);
18Args::Flag hashFormatOpt(std::string && longName, std::optional<HashFormat> * ohf);
19
20static inline Args::Flag hashAlgoOpt(std::optional<HashAlgorithm> * oha)
21{
22 return hashAlgoOpt("hash-algo", oha);
23}
24
25Args::Flag fileIngestionMethod(FileIngestionMethod * method);
26Args::Flag contentAddressMethod(ContentAddressMethod * method);
27
28} // namespace nix::flag