Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
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
10namespace nix {
11
16using UncheckedRoots = boost::unordered_flat_map<
17 std::string,
18 boost::unordered_flat_set<std::string, StringViewHash, std::equal_to<>>,
20 std::equal_to<>>;
21
22inline 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
29void findPlatformRuntimeRoots(const StoreDirConfig & config, UncheckedRoots & unchecked);
30
31} // namespace nix
Definition store-dir-config.hh:29
Definition strings.hh:142