Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
local-gc-private.hh
1
#pragma once
2
3
#include "nix/store/store-dir-config.hh"
4
#include "
nix/util/types.hh
"
5
6
#include <boost/regex.hpp>
7
#include <boost/unordered/unordered_flat_map.hpp>
8
#include <boost/unordered/unordered_flat_set.hpp>
9
10
namespace
nix {
11
16
using
UncheckedRoots = boost::unordered_flat_map<
17
std::string,
18
boost::unordered_flat_set<std::string, StringViewHash, std::equal_to<>>,
19
StringViewHash
,
20
std::equal_to<>>;
21
22
inline
boost::regex makeStorePathRegex(
const
StoreDirConfig
& config)
23
{
24
static
auto
specialRegex = boost::regex(R
"([.^$\\*+?()\[\]{}|])");
25
auto
quotedStoreDir = boost::regex_replace(config.storeDir, specialRegex, R
"(\\$&)");
26
return
boost::regex(quotedStoreDir + R
"(/[0-9a-z]+[0-9a-zA-Z\+\-\._\?=]*)");
27
}
28
29
void
findPlatformRuntimeRoots(
const
StoreDirConfig
& config, UncheckedRoots & unchecked);
30
31
}
// namespace nix
nix::StoreDirConfig
Definition
store-dir-config.hh:29
nix::StringViewHash
Definition
strings.hh:142
types.hh
libstore
local-gc-private.hh
Generated by
1.18.0