id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
11,042
print.cc
NixOS_nix/src/libexpr-tests/value/print.cc
#include "tests/libexpr.hh" #include "value.hh" #include "print.hh" namespace nix { using namespace testing; struct ValuePrintingTests : LibExprTest { template<class... A> void test(Value v, std::string_view expected, A... args) { std::stringstream out; v.print(state, out, args...); ...
18,226
C++
.cc
640
22.382813
125
0.607612
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,043
value.cc
NixOS_nix/src/libexpr-tests/value/value.cc
#include "value.hh" #include "tests/libstore.hh" namespace nix { class ValueTest : public LibStoreTest {}; TEST_F(ValueTest, unsetValue) { Value unsetValue; ASSERT_EQ(false, unsetValue.isValid()); ASSERT_EQ(nThunk, unsetValue.type(true)); ASSERT_DEATH(unsetValue.type(), ""); } TEST_F(ValueTest, vIn...
420
C++
.cc
19
19.315789
45
0.706329
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,044
context.cc
NixOS_nix/src/libexpr-tests/value/context.cc
#include <nlohmann/json.hpp> #include <gtest/gtest.h> #include <rapidcheck/gtest.h> #include "tests/path.hh" #include "tests/libexpr.hh" #include "tests/value/context.hh" namespace nix { // Test a few cases of invalid string context elements. TEST(NixStringContextElemTest, empty_invalid) { EXPECT_THROW( ...
3,995
C++
.cc
114
31.166667
123
0.711105
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,045
nix_api_value.cc
NixOS_nix/src/libexpr-c/nix_api_value.cc
#include "attr-set.hh" #include "config.hh" #include "eval.hh" #include "globals.hh" #include "path.hh" #include "primops.hh" #include "value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" #include "nix_api_util.h" #include "nix_api_util_internal.h" #include "nix_api_store_internal.h" #include "nix_a...
18,083
C++
.cc
598
24.585284
120
0.613681
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,046
nix_api_expr.cc
NixOS_nix/src/libexpr-c/nix_api_expr.cc
#include <cstring> #include <stdexcept> #include <string> #include "eval.hh" #include "eval-gc.hh" #include "globals.hh" #include "eval-settings.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" #include "nix_api_store.h" #include "nix_api_store_internal.h" #include "nix_api_util.h" #include "nix_api_u...
5,431
C++
.cc
190
23.115789
140
0.612835
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,047
nix_api_external.cc
NixOS_nix/src/libexpr-c/nix_api_external.cc
#include "attr-set.hh" #include "config.hh" #include "eval.hh" #include "globals.hh" #include "value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" #include "nix_api_external.h" #include "nix_api_util.h" #include "nix_api_util_internal.h" #include "nix_api_value.h" #include "value/context.hh" #inclu...
5,186
C++
.cc
176
23.045455
117
0.610533
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,048
shared.cc
NixOS_nix/src/libmain/shared.cc
#include "globals.hh" #include "current-process.hh" #include "shared.hh" #include "store-api.hh" #include "gc-store.hh" #include "loggers.hh" #include "progress-bar.hh" #include "signals.hh" #include <algorithm> #include <exception> #include <iostream> #include <cstdlib> #include <sys/time.h> #include <sys/stat.h> #i...
13,662
C++
.cc
363
31.212121
200
0.619803
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,049
progress-bar.cc
NixOS_nix/src/libmain/progress-bar.cc
#include "progress-bar.hh" #include "terminal.hh" #include "sync.hh" #include "store-api.hh" #include "names.hh" #include <atomic> #include <map> #include <thread> #include <sstream> #include <iostream> #include <chrono> namespace nix { static std::string_view getS(const std::vector<Logger::Field> & fields, size_t n...
17,812
C++
.cc
480
26.5625
143
0.519232
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,050
loggers.cc
NixOS_nix/src/libmain/loggers.cc
#include "loggers.hh" #include "environment-variables.hh" #include "progress-bar.hh" namespace nix { LogFormat defaultLogFormat = LogFormat::raw; LogFormat parseLogFormat(const std::string & logFormatStr) { if (logFormatStr == "raw" || getEnv("NIX_GET_COMPLETIONS")) return LogFormat::raw; else if (lo...
1,537
C++
.cc
48
27.104167
79
0.700203
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,051
common-args.cc
NixOS_nix/src/libmain/common-args.cc
#include "common-args.hh" #include "args/root.hh" #include "config-global.hh" #include "globals.hh" #include "logging.hh" #include "loggers.hh" #include "util.hh" #include "plugin.hh" namespace nix { MixCommonArgs::MixCommonArgs(const std::string & programName) : programName(programName) { addFlag({ ....
3,009
C++
.cc
84
27.857143
112
0.571772
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,052
plugin.cc
NixOS_nix/src/libmain/plugin.cc
#ifndef _WIN32 # include <dlfcn.h> #endif #include <filesystem> #include "config-global.hh" #include "signals.hh" namespace nix { struct PluginFilesSetting : public BaseSetting<Paths> { bool pluginsLoaded = false; PluginFilesSetting( Config * options, const Paths & def, const std::...
4,288
C++
.cc
101
34.435644
111
0.654833
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,053
stack.cc
NixOS_nix/src/libmain/unix/stack.cc
#include "error.hh" #include "shared.hh" #include <cstring> #include <cstddef> #include <cstdlib> #include <unistd.h> #include <signal.h> namespace nix { static void sigsegvHandler(int signo, siginfo_t * info, void * ctx) { /* Detect stack overflows by comparing the faulting address with the stack point...
2,298
C++
.cc
64
31.578125
100
0.666817
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,054
nix-channel.cc
NixOS_nix/src/nix-channel/nix-channel.cc
#include "profiles.hh" #include "shared.hh" #include "globals.hh" #include "filetransfer.hh" #include "store-api.hh" #include "legacy.hh" #include "eval-settings.hh" // for defexpr #include "users.hh" #include "tarball.hh" #include "self-exe.hh" #include <fcntl.h> #include <regex> #include <pwd.h> using namespace nix...
10,312
C++
.cc
239
32.953975
213
0.549681
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,055
user-env.cc
NixOS_nix/src/nix-env/user-env.cc
#include "user-env.hh" #include "derivations.hh" #include "store-api.hh" #include "path-with-outputs.hh" #include "local-fs-store.hh" #include "globals.hh" #include "shared.hh" #include "eval.hh" #include "eval-inline.hh" #include "profiles.hh" #include "print-ambiguous.hh" #include <limits> #include <sstream> namesp...
6,423
C++
.cc
145
37.144828
139
0.670242
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,056
nix-env.cc
NixOS_nix/src/nix-env/nix-env.cc
#include "users.hh" #include "attr-path.hh" #include "common-eval-args.hh" #include "derivations.hh" #include "eval.hh" #include "get-drvs.hh" #include "globals.hh" #include "names.hh" #include "profiles.hh" #include "path-with-outputs.hh" #include "shared.hh" #include "store-api.hh" #include "local-fs-store.hh" #inclu...
54,502
C++
.cc
1,279
31.326818
134
0.553239
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,057
lockfile.cc
NixOS_nix/src/libflake/flake/lockfile.cc
#include <unordered_set> #include "lockfile.hh" #include "store-api.hh" #include <algorithm> #include <iomanip> #include <iterator> #include <nlohmann/json.hpp> #include "strings.hh" namespace nix::flake { static FlakeRef getFlakeRef( const fetchers::Settings & fetchSettings, const nlohmann::json & json, ...
12,031
C++
.cc
317
29.542587
117
0.56431
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,058
config.cc
NixOS_nix/src/libflake/flake/config.cc
#include "users.hh" #include "config-global.hh" #include "flake/settings.hh" #include "flake.hh" #include <nlohmann/json.hpp> namespace nix::flake { // setting name -> setting value -> allow or ignore. typedef std::map<std::string, std::map<std::string, bool>> TrustedList; Path trustedListPath() { return getDat...
2,990
C++
.cc
68
35.544118
191
0.591268
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,059
url-name.cc
NixOS_nix/src/libflake/flake/url-name.cc
#include "url-name.hh" #include <regex> #include <iostream> namespace nix { static const std::string attributeNamePattern("[a-zA-Z0-9_-]+"); static const std::regex lastAttributeRegex("^((?:" + attributeNamePattern + "\\.)*)(" + attributeNamePattern +")(\\^.*)?$"); static const std::string pathSegmentPattern("[a-zA-Z...
1,866
C++
.cc
36
47.444444
124
0.675824
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,060
flake.cc
NixOS_nix/src/libflake/flake/flake.cc
#include "terminal.hh" #include "flake.hh" #include "eval.hh" #include "eval-settings.hh" #include "lockfile.hh" #include "primops.hh" #include "eval-inline.hh" #include "store-api.hh" #include "fetchers.hh" #include "finally.hh" #include "fetch-settings.hh" #include "flake/settings.hh" #include "value-to-json.hh" #inc...
40,462
C++
.cc
825
34.586667
159
0.547592
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,061
flakeref.cc
NixOS_nix/src/libflake/flake/flakeref.cc
#include "flakeref.hh" #include "store-api.hh" #include "url.hh" #include "url-parts.hh" #include "fetchers.hh" #include "registry.hh" namespace nix { #if 0 // 'dir' path elements cannot start with a '.'. We also reject // potentially dangerous characters like ';'. const static std::string subDirElemRegex = "(?:[a-zA...
10,434
C++
.cc
267
30.509363
145
0.587828
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,062
nix-copy-closure.cc
NixOS_nix/src/nix-copy-closure/nix-copy-closure.cc
#include "shared.hh" #include "realisation.hh" #include "store-api.hh" #include "legacy.hh" using namespace nix; static int main_nix_copy_closure(int argc, char ** argv) { { auto gzip = false; auto toMode = true; auto includeOutputs = false; auto dryRun = false; auto useSub...
2,260
C++
.cc
55
30.4
94
0.534153
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,063
nix_api_main.cc
NixOS_nix/src/libmain-c/nix_api_main.cc
#include "nix_api_store.h" #include "nix_api_store_internal.h" #include "nix_api_util.h" #include "nix_api_util_internal.h" #include "plugin.hh" nix_err nix_init_plugins(nix_c_context * context) { if (context) context->last_err_code = NIX_OK; try { nix::initPlugins(); } NIXC_CATCH_ERRS...
323
C++
.cc
14
19.642857
49
0.667752
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,064
url-name.cc
NixOS_nix/src/libflake-tests/url-name.cc
#include "flake/url-name.hh" #include <gtest/gtest.h> namespace nix { /* ----------- tests for url-name.hh --------------------------------------------------*/ TEST(getNameFromURL, getNameFromURL) { ASSERT_EQ(getNameFromURL(parseURL("path:/home/user/project")), "project"); ASSERT_EQ(getNameFromUR...
5,539
C++
.cc
59
85.508475
141
0.695557
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,065
flakeref.cc
NixOS_nix/src/libflake-tests/flakeref.cc
#include <gtest/gtest.h> #include "fetch-settings.hh" #include "flake/flakeref.hh" namespace nix { /* ----------- tests for flake/flakeref.hh --------------------------------------------------*/ /* ---------------------------------------------------------------------------- * to_string * -------------...
741
C++
.cc
17
38.058824
95
0.453278
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,066
nix_api_util.cc
NixOS_nix/src/libutil-c/nix_api_util.cc
#include "nix_api_util.h" #include "config-global.hh" #include "error.hh" #include "nix_api_util_internal.h" #include "util.hh" #include <cxxabi.h> #include <typeinfo> nix_c_context * nix_c_context_create() { return new nix_c_context(); } void nix_c_context_free(nix_c_context * context) { delete context; } ...
4,398
C++
.cc
140
26.357143
118
0.635314
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,067
store-path-accessor.cc
NixOS_nix/src/libfetchers/store-path-accessor.cc
#include "store-path-accessor.hh" #include "store-api.hh" namespace nix { ref<SourceAccessor> makeStorePathAccessor(ref<Store> store, const StorePath & storePath) { // FIXME: should use `store->getFSAccessor()` auto root = std::filesystem::path{store->toRealPath(storePath)}; auto accessor = makeFSSourceAc...
405
C++
.cc
12
30.833333
88
0.748718
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,068
fetch-to-store.cc
NixOS_nix/src/libfetchers/fetch-to-store.cc
#include "fetch-to-store.hh" #include "fetchers.hh" #include "cache.hh" namespace nix { StorePath fetchToStore( Store & store, const SourcePath & path, FetchMode mode, std::string_view name, ContentAddressMethod method, PathFilter * filter, RepairFlag repair) { // FIXME: add an optimis...
1,648
C++
.cc
43
31.418605
93
0.625705
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,069
git-utils.cc
NixOS_nix/src/libfetchers/git-utils.cc
#include "git-utils.hh" #include "cache.hh" #include "finally.hh" #include "processes.hh" #include "signals.hh" #include "users.hh" #include "fs-sink.hh" #include <git2/attr.h> #include <git2/blob.h> #include <git2/commit.h> #include <git2/config.h> #include <git2/describe.h> #include <git2/errors.h> #include <git2/gl...
44,371
C++
.cc
1,043
33.917546
137
0.605925
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,070
filtering-source-accessor.cc
NixOS_nix/src/libfetchers/filtering-source-accessor.cc
#include "filtering-source-accessor.hh" namespace nix { std::optional<std::filesystem::path> FilteringSourceAccessor::getPhysicalPath(const CanonPath & path) { checkAccess(path); return next->getPhysicalPath(prefix / path); } std::string FilteringSourceAccessor::readFile(const CanonPath & path) { checkAc...
2,735
C++
.cc
82
29.182927
115
0.736443
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,071
path.cc
NixOS_nix/src/libfetchers/path.cc
#include "fetchers.hh" #include "store-api.hh" #include "archive.hh" #include "store-path-accessor.hh" namespace nix::fetchers { struct PathInputScheme : InputScheme { std::optional<Input> inputFromURL( const Settings & settings, const ParsedURL & url, bool requireTree) const override { ...
6,391
C++
.cc
161
30.236025
125
0.582473
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,072
git.cc
NixOS_nix/src/libfetchers/git.cc
#include "error.hh" #include "fetchers.hh" #include "users.hh" #include "cache.hh" #include "globals.hh" #include "tarfile.hh" #include "store-api.hh" #include "url-parts.hh" #include "pathlocks.hh" #include "processes.hh" #include "git.hh" #include "mounted-source-accessor.hh" #include "git-utils.hh" #include "logging...
30,058
C++
.cc
667
34.602699
181
0.585545
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,073
attrs.cc
NixOS_nix/src/libfetchers/attrs.cc
#include "attrs.hh" #include "fetchers.hh" #include <nlohmann/json.hpp> namespace nix::fetchers { Attrs jsonToAttrs(const nlohmann::json & json) { Attrs attrs; for (auto & i : json.items()) { if (i.value().is_number()) attrs.emplace(i.key(), i.value().get<uint64_t>()); else if (i...
3,387
C++
.cc
97
29.639175
92
0.607634
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,074
indirect.cc
NixOS_nix/src/libfetchers/indirect.cc
#include "fetchers.hh" #include "url-parts.hh" #include "path.hh" namespace nix::fetchers { std::regex flakeRegex("[a-zA-Z][a-zA-Z0-9_-]*", std::regex::ECMAScript); struct IndirectInputScheme : InputScheme { std::optional<Input> inputFromURL( const Settings & settings, const ParsedURL & url, bool...
3,804
C++
.cc
99
30.10101
115
0.575733
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,075
github.cc
NixOS_nix/src/libfetchers/github.cc
#include "filetransfer.hh" #include "cache.hh" #include "globals.hh" #include "store-api.hh" #include "types.hh" #include "url-parts.hh" #include "git.hh" #include "fetchers.hh" #include "fetch-settings.hh" #include "tarball.hh" #include "tarfile.hh" #include "git-utils.hh" #include <optional> #include <nlohmann/json....
21,926
C++
.cc
486
35.679012
123
0.59732
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,076
fetchers.cc
NixOS_nix/src/libfetchers/fetchers.cc
#include "fetchers.hh" #include "store-api.hh" #include "source-path.hh" #include "fetch-to-store.hh" #include "json-utils.hh" #include "store-path-accessor.hh" #include <nlohmann/json.hpp> namespace nix::fetchers { using InputSchemeMap = std::map<std::string_view, std::shared_ptr<InputScheme>>; std::unique_ptr<Inp...
14,550
C++
.cc
404
30.190594
145
0.646146
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,077
mercurial.cc
NixOS_nix/src/libfetchers/mercurial.cc
#include "fetchers.hh" #include "processes.hh" #include "users.hh" #include "cache.hh" #include "globals.hh" #include "tarfile.hh" #include "store-api.hh" #include "url-parts.hh" #include "store-path-accessor.hh" #include "fetch-settings.hh" #include <sys/time.h> using namespace std::string_literals; namespace nix::...
11,997
C++
.cc
286
31.416084
137
0.550559
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,078
tarball.cc
NixOS_nix/src/libfetchers/tarball.cc
#include "tarball.hh" #include "fetchers.hh" #include "cache.hh" #include "filetransfer.hh" #include "store-api.hh" #include "archive.hh" #include "tarfile.hh" #include "types.hh" #include "store-path-accessor.hh" #include "store-api.hh" #include "git-utils.hh" namespace nix::fetchers { DownloadFileResult downloadFil...
13,658
C++
.cc
336
32.261905
113
0.618846
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,079
cache.cc
NixOS_nix/src/libfetchers/cache.cc
#include "cache.hh" #include "users.hh" #include "sqlite.hh" #include "sync.hh" #include "store-api.hh" #include <nlohmann/json.hpp> namespace nix::fetchers { static const char * schema = R"sql( create table if not exists Cache ( domain text not null, key text not null, value text not null,...
4,542
C++
.cc
137
25.19708
99
0.58156
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,080
registry.cc
NixOS_nix/src/libfetchers/registry.cc
#include "fetch-settings.hh" #include "registry.hh" #include "tarball.hh" #include "users.hh" #include "globals.hh" #include "store-api.hh" #include "local-fs-store.hh" #include <nlohmann/json.hpp> namespace nix::fetchers { std::shared_ptr<Registry> Registry::read( const Settings & settings, const Path & pat...
6,427
C++
.cc
188
26.457447
111
0.591972
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,081
mounted-source-accessor.cc
NixOS_nix/src/libfetchers/mounted-source-accessor.cc
#include "mounted-source-accessor.hh" namespace nix { struct MountedSourceAccessor : SourceAccessor { std::map<CanonPath, ref<SourceAccessor>> mounts; MountedSourceAccessor(std::map<CanonPath, ref<SourceAccessor>> _mounts) : mounts(std::move(_mounts)) { displayPrefix.clear(); // ...
2,272
C++
.cc
64
28.390625
94
0.644323
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,083
run.hh
NixOS_nix/src/nix/run.hh
#pragma once ///@file #include "store-api.hh" namespace nix { enum struct UseLookupPath { Use, DontUse }; void execProgramInStore(ref<Store> store, UseLookupPath useLookupPath, const std::string & program, const Strings & args, std::optional<std::string_view> system = std::nullopt); }
315
C++
.h
14
19.428571
59
0.722973
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,084
self-exe.hh
NixOS_nix/src/nix/self-exe.hh
#pragma once ///@file #include <filesystem> namespace nix { /** * Get a path to the given Nix binary. * * Normally, nix is installed according to `NIX_BIN_DIR`, which is set * at compile time, but can be overridden. * * However, it may not have been installed at all. For example, if it's * a static build, the...
1,042
C++
.h
27
36.703704
82
0.723046
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,085
filetransfer.hh
NixOS_nix/src/libstore/filetransfer.hh
#pragma once ///@file #include <string> #include <future> #include "logging.hh" #include "types.hh" #include "ref.hh" #include "config.hh" #include "serialise.hh" namespace nix { struct FileTransferSettings : Config { Setting<bool> enableHttp2{this, true, "http2", "Whether to enable HTTP/2 support."}; ...
4,844
C++
.h
148
27.405405
109
0.67403
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,086
common-ssh-store-config.hh
NixOS_nix/src/libstore/common-ssh-store-config.hh
#pragma once ///@file #include "store-api.hh" namespace nix { class SSHMaster; struct CommonSSHStoreConfig : virtual StoreConfig { using StoreConfig::StoreConfig; CommonSSHStoreConfig(std::string_view scheme, std::string_view host, const Params & params); const Setting<Path> sshKey{this, "", "ssh-key"...
2,021
C++
.h
50
34.56
96
0.653905
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,087
indirect-root-store.hh
NixOS_nix/src/libstore/indirect-root-store.hh
#pragma once ///@file #include "local-fs-store.hh" namespace nix { /** * Mix-in class for implementing permanent roots as a pair of a direct * (strong) reference and indirect weak reference to the first * reference. * * See methods for details on the operations it represents. * * @note * To understand the pu...
2,741
C++
.h
68
36.794118
86
0.668417
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,088
nar-info-disk-cache.hh
NixOS_nix/src/libstore/nar-info-disk-cache.hh
#pragma once ///@file #include "ref.hh" #include "nar-info.hh" #include "realisation.hh" namespace nix { class NarInfoDiskCache { public: typedef enum { oValid, oInvalid, oUnknown } Outcome; virtual ~NarInfoDiskCache() { } virtual int createCache(const std::string & uri, const Path & storeDir, ...
1,417
C++
.h
41
29.658537
86
0.694057
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,089
legacy-ssh-store.hh
NixOS_nix/src/libstore/legacy-ssh-store.hh
#pragma once ///@file #include "common-ssh-store-config.hh" #include "store-api.hh" #include "ssh.hh" #include "callback.hh" #include "pool.hh" namespace nix { struct LegacySSHStoreConfig : virtual CommonSSHStoreConfig { using CommonSSHStoreConfig::CommonSSHStoreConfig; LegacySSHStoreConfig( std::st...
4,507
C++
.h
106
36.679245
127
0.718507
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,090
log-store.hh
NixOS_nix/src/libstore/log-store.hh
#pragma once ///@file #include "store-api.hh" namespace nix { struct LogStore : public virtual Store { inline static std::string operationName = "Build log storage and retrieval"; /** * Return the build log of the specified store path, if available, * or null otherwise. */ std::optional<...
590
C++
.h
17
30.882353
84
0.710993
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,091
names.hh
NixOS_nix/src/libstore/names.hh
#pragma once ///@file #include <memory> #include "types.hh" namespace nix { struct Regex; struct DrvName { std::string fullName; std::string name; std::string version; unsigned int hits; DrvName(); DrvName(std::string_view s); ~DrvName(); bool matches(const DrvName & n); private:...
661
C++
.h
25
23.4
91
0.7296
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,092
worker-protocol.hh
NixOS_nix/src/libstore/worker-protocol.hh
#pragma once ///@file #include <chrono> #include "common-protocol.hh" namespace nix { #define WORKER_MAGIC_1 0x6e697863 #define WORKER_MAGIC_2 0x6478696f /* Note: you generally shouldn't change the protocol version. Define a new `WorkerProto::Feature` instead. */ #define PROTOCOL_VERSION (1 << 8 | 38) #define ...
8,157
C++
.h
252
28.480159
100
0.706555
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,093
path-references.hh
NixOS_nix/src/libstore/path-references.hh
#pragma once ///@file #include "references.hh" #include "path.hh" namespace nix { std::pair<StorePathSet, HashResult> scanForReferences(const Path & path, const StorePathSet & refs); StorePathSet scanForReferences(Sink & toTee, const Path & path, const StorePathSet & refs); class PathRefScanSink : public RefScanSi...
576
C++
.h
16
33.375
100
0.767273
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,094
derivations.hh
NixOS_nix/src/libstore/derivations.hh
#pragma once ///@file #include "path.hh" #include "types.hh" #include "hash.hh" #include "content-address.hh" #include "repair-flag.hh" #include "derived-path-map.hh" #include "sync.hh" #include "variant-wrapper.hh" #include <map> #include <variant> namespace nix { struct StoreDirConfig; /* Abstract syntax of deri...
15,789
C++
.h
445
30.116854
123
0.678394
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,095
pathlocks.hh
NixOS_nix/src/libstore/pathlocks.hh
#pragma once ///@file #include "file-descriptor.hh" namespace nix { /** * Open (possibly create) a lock file and return the file descriptor. * -1 is returned if create is false and the lock could not be opened * because it doesn't exist. Any other error throws an exception. */ AutoCloseFD openLockFile(const Pat...
1,218
C++
.h
45
23.355556
84
0.690784
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,096
make-content-addressed.hh
NixOS_nix/src/libstore/make-content-addressed.hh
#pragma once ///@file #include "store-api.hh" namespace nix { /** Rewrite a closure of store paths to be completely content addressed. */ std::map<StorePath, StorePath> makeContentAddressed( Store & srcStore, Store & dstStore, const StorePathSet & rootPaths); /** Rewrite a closure of a store path to be...
552
C++
.h
19
26.315789
81
0.744318
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,097
gc-store.hh
NixOS_nix/src/libstore/gc-store.hh
#pragma once ///@file #include <unordered_set> #include "store-api.hh" namespace nix { typedef std::unordered_map<StorePath, std::unordered_set<std::string>> Roots; struct GCOptions { /** * Garbage collector operation: * * - `gcReturnLive`: return the set of paths reachable from * (i.e....
3,428
C++
.h
101
29.653465
84
0.672007
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,098
local-fs-store.hh
NixOS_nix/src/libstore/local-fs-store.hh
#pragma once ///@file #include "store-api.hh" #include "gc-store.hh" #include "log-store.hh" namespace nix { struct LocalFSStoreConfig : virtual StoreConfig { using StoreConfig::StoreConfig; /** * Used to override the `root` settings. Can't be done via modifying * `params` reliably because this pa...
2,626
C++
.h
67
33.761194
85
0.690673
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,099
local-binary-cache-store.hh
NixOS_nix/src/libstore/local-binary-cache-store.hh
#include "binary-cache-store.hh" namespace nix { struct LocalBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig { using BinaryCacheStoreConfig::BinaryCacheStoreConfig; LocalBinaryCacheStoreConfig(std::string_view scheme, PathView binaryCacheDir, const Params & params); Path binaryCacheDir; con...
493
C++
.h
15
28.666667
105
0.755319
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,100
machines.hh
NixOS_nix/src/libstore/machines.hh
#pragma once ///@file #include "ref.hh" #include "store-reference.hh" namespace nix { class Store; struct Machine; typedef std::vector<Machine> Machines; struct Machine { const StoreReference storeUri; const std::set<std::string> systemTypes; const std::string sshKey; const unsigned int maxJobs; ...
2,292
C++
.h
72
26.708333
106
0.681034
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,101
common-protocol.hh
NixOS_nix/src/libstore/common-protocol.hh
#pragma once ///@file #include "serialise.hh" namespace nix { struct StoreDirConfig; struct Source; // items being serialized class StorePath; struct ContentAddress; struct DrvOutput; struct Realisation; /** * Shared serializers between the worker protocol, serve protocol, and a * few others. * * This `struct...
2,838
C++
.h
91
28.175824
102
0.732796
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,102
worker-protocol-connection.hh
NixOS_nix/src/libstore/worker-protocol-connection.hh
#pragma once ///@file #include "worker-protocol.hh" #include "store-api.hh" namespace nix { struct WorkerProto::BasicConnection { /** * Send with this. */ FdSink to; /** * Receive with this. */ FdSource from; /** * The protocol version agreed by both sides. */ ...
4,915
C++
.h
147
27.353741
119
0.669056
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,103
remote-store.hh
NixOS_nix/src/libstore/remote-store.hh
#pragma once ///@file #include <limits> #include <string> #include "store-api.hh" #include "gc-store.hh" #include "log-store.hh" namespace nix { class Pipe; class Pid; struct FdSink; struct FdSource; template<typename T> class Pool; struct RemoteStoreConfig : virtual StoreConfig { using StoreConfig::StoreCon...
6,046
C++
.h
137
38.094891
146
0.733961
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,104
globals.hh
NixOS_nix/src/libstore/globals.hh
#pragma once ///@file #include "types.hh" #include "config.hh" #include "environment-variables.hh" #include "experimental-features.hh" #include "users.hh" #include <map> #include <limits> #include <sys/types.h> namespace nix { typedef enum { smEnabled, smRelaxed, smDisabled } SandboxMode; struct MaxBuildJobsSetti...
53,899
C++
.h
1,016
43.383858
310
0.650652
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,105
posix-fs-canonicalise.hh
NixOS_nix/src/libstore/posix-fs-canonicalise.hh
#pragma once ///@file #include <sys/stat.h> #include <sys/time.h> #include "types.hh" #include "error.hh" namespace nix { typedef std::pair<dev_t, ino_t> Inode; typedef std::set<Inode> InodesSeen; /** * "Fix", or canonicalise, the meta-data of the files in a store path * after it has been built. In particular:...
1,246
C++
.h
41
28.170732
69
0.718828
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,106
store-cast.hh
NixOS_nix/src/libstore/store-cast.hh
#pragma once ///@file #include "store-api.hh" namespace nix { /** * Helper to try downcasting a Store with a nice method if it fails. * * This is basically an alternative to the user-facing part of * Store::unsupported that allows us to still have a nice message but * better interface design. */ template<typen...
554
C++
.h
20
25.2
93
0.711321
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,107
daemon.hh
NixOS_nix/src/libstore/daemon.hh
#pragma once ///@file #include "serialise.hh" #include "store-api.hh" namespace nix::daemon { enum RecursiveFlag : bool { NotRecursive = false, Recursive = true }; void processConnection( ref<Store> store, FdSource && from, FdSink && to, TrustedFlag trusted, RecursiveFlag recursive); }
312
C++
.h
13
21.076923
69
0.721088
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,108
s3.hh
NixOS_nix/src/libstore/s3.hh
#pragma once ///@file #if ENABLE_S3 #include "ref.hh" #include <optional> #include <string> namespace Aws { namespace Client { struct ClientConfiguration; } } namespace Aws { namespace S3 { class S3Client; } } namespace nix { struct S3Helper { ref<Aws::Client::ClientConfiguration> config; ref<Aws::S3::S3C...
839
C++
.h
25
29.84
139
0.714464
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,109
local-store.hh
NixOS_nix/src/libstore/local-store.hh
#pragma once ///@file #include "sqlite.hh" #include "pathlocks.hh" #include "store-api.hh" #include "indirect-root-store.hh" #include "sync.hh" #include <chrono> #include <future> #include <string> #include <unordered_set> namespace nix { /** * Nix store and database schema version. * * Version 1 (or 0) was N...
12,121
C++
.h
303
33.910891
200
0.6956
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,110
local-overlay-store.hh
NixOS_nix/src/libstore/local-overlay-store.hh
#include "local-store.hh" namespace nix { /** * Configuration for `LocalOverlayStore`. */ struct LocalOverlayStoreConfig : virtual LocalStoreConfig { LocalOverlayStoreConfig(const StringMap & params) : LocalOverlayStoreConfig("local-overlay", "", params) { } LocalOverlayStoreConfig(std::string_...
7,487
C++
.h
182
35.005495
111
0.687853
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,111
worker-protocol-impl.hh
NixOS_nix/src/libstore/worker-protocol-impl.hh
#pragma once /** * @file * * Template implementations (as opposed to mere declarations). * * This file is an exmample of the "impl.hh" pattern. See the * contributing guide. */ #include "worker-protocol.hh" #include "length-prefixed-protocol-helper.hh" namespace nix { /* protocol-agnostic templates */ #defin...
1,817
C++
.h
49
33.183673
126
0.7112
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,112
binary-cache-store.hh
NixOS_nix/src/libstore/binary-cache-store.hh
#pragma once ///@file #include "signature/local-keys.hh" #include "store-api.hh" #include "log-store.hh" #include "pool.hh" #include <atomic> namespace nix { struct NarInfo; struct BinaryCacheStoreConfig : virtual StoreConfig { using StoreConfig::StoreConfig; const Setting<std::string> compression{this, ...
4,972
C++
.h
112
38.321429
126
0.710811
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,113
outputs-spec.hh
NixOS_nix/src/libstore/outputs-spec.hh
#pragma once ///@file #include <cassert> #include <optional> #include <set> #include <variant> #include "json-impls.hh" #include "variant-wrapper.hh" namespace nix { /** * An (owned) output name. Just a type alias used to make code more * readible. */ typedef std::string OutputName; /** * A borrowed output nam...
3,231
C++
.h
97
27.989691
104
0.649049
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,114
path-with-outputs.hh
NixOS_nix/src/libstore/path-with-outputs.hh
#pragma once ///@file #include "path.hh" #include "derived-path.hh" namespace nix { struct StoreDirConfig; /** * This is a deprecated old type just for use by the old CLI, and older * versions of the RPC protocols. In new code don't use it; you want * `DerivedPath` instead. * * `DerivedPath` is better because ...
1,334
C++
.h
34
36.794118
110
0.781493
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,115
realisation.hh
NixOS_nix/src/libstore/realisation.hh
#pragma once ///@file #include <variant> #include "hash.hh" #include "path.hh" #include "derived-path.hh" #include <nlohmann/json_fwd.hpp> #include "comparator.hh" #include "signature/signer.hh" namespace nix { class Store; struct OutputsSpec; /** * A general `Realisation` key. * * This is similar to a `Derived...
4,171
C++
.h
122
30.016393
93
0.706527
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,116
path-info.hh
NixOS_nix/src/libstore/path-info.hh
#pragma once ///@file #include "signature/signer.hh" #include "path.hh" #include "hash.hh" #include "content-address.hh" #include <string> #include <optional> namespace nix { class Store; struct SubstitutablePathInfo { std::optional<StorePath> deriver; StorePathSet references; /** * 0 = unknown ...
5,766
C++
.h
154
32.331169
120
0.693801
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,117
remote-store-connection.hh
NixOS_nix/src/libstore/remote-store-connection.hh
#pragma once ///@file #include "remote-store.hh" #include "worker-protocol.hh" #include "worker-protocol-connection.hh" #include "pool.hh" namespace nix { /** * Bidirectional connection (send and receive) used by the Remote Store * implementation. * * Contains `Source` and `Sink` for actual communication, along ...
1,625
C++
.h
46
32.086957
99
0.728954
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,118
store-dir-config.hh
NixOS_nix/src/libstore/store-dir-config.hh
#pragma once #include "path.hh" #include "hash.hh" #include "content-address.hh" #include "globals.hh" #include "config.hh" #include <map> #include <string> #include <variant> namespace nix { struct SourcePath; MakeError(BadStorePath, Error); MakeError(BadStorePathName, BadStorePath); struct StoreDirConfig : pub...
2,916
C++
.h
81
30.444444
110
0.680669
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,119
keys.hh
NixOS_nix/src/libstore/keys.hh
#pragma once ///@file #include "signature/local-keys.hh" namespace nix { PublicKeys getDefaultPublicKeys(); }
114
C++
.h
6
17.333333
34
0.798077
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,120
nar-accessor.hh
NixOS_nix/src/libstore/nar-accessor.hh
#pragma once ///@file #include "source-accessor.hh" #include <functional> #include <nlohmann/json_fwd.hpp> namespace nix { struct Source; /** * Return an object that provides access to the contents of a NAR * file. */ ref<SourceAccessor> makeNarAccessor(std::string && nar); ref<SourceAccessor> makeNarAccessor...
935
C++
.h
29
30.206897
91
0.756425
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,121
ssh-store.hh
NixOS_nix/src/libstore/ssh-store.hh
#pragma once ///@file #include "common-ssh-store-config.hh" #include "store-api.hh" #include "local-fs-store.hh" #include "remote-store.hh" namespace nix { struct SSHStoreConfig : virtual RemoteStoreConfig, virtual CommonSSHStoreConfig { using CommonSSHStoreConfig::CommonSSHStoreConfig; using RemoteStoreConf...
1,516
C++
.h
45
29.044444
110
0.72646
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,122
serve-protocol.hh
NixOS_nix/src/libstore/serve-protocol.hh
#pragma once ///@file #include "common-protocol.hh" namespace nix { #define SERVE_MAGIC_1 0x390c9deb #define SERVE_MAGIC_2 0x5452eecb #define SERVE_PROTOCOL_VERSION (2 << 8 | 7) #define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00) #define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff) struct StoreDirConfig; struct Source; // item...
4,954
C++
.h
166
25.945783
99
0.690191
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,123
http-binary-cache-store.hh
NixOS_nix/src/libstore/http-binary-cache-store.hh
#include "binary-cache-store.hh" namespace nix { struct HttpBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig { using BinaryCacheStoreConfig::BinaryCacheStoreConfig; HttpBinaryCacheStoreConfig(std::string_view scheme, std::string_view _cacheUri, const Params & params); Path cacheUri; const st...
700
C++
.h
22
26.272727
107
0.667164
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,124
serve-protocol-impl.hh
NixOS_nix/src/libstore/serve-protocol-impl.hh
#pragma once /** * @file * * Template implementations (as opposed to mere declarations). * * This file is an exmample of the "impl.hh" pattern. See the * contributing guide. */ #include "serve-protocol.hh" #include "length-prefixed-protocol-helper.hh" namespace nix { /* protocol-agnostic templates */ #define...
1,799
C++
.h
49
32.816327
124
0.708214
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,125
serve-protocol-connection.hh
NixOS_nix/src/libstore/serve-protocol-connection.hh
#pragma once ///@file #include "serve-protocol.hh" #include "store-api.hh" namespace nix { struct ServeProto::BasicClientConnection { FdSink to; FdSource from; ServeProto::Version remoteVersion; /** * Establishes connection, negotiating version. * * @return the version provided by the...
3,137
C++
.h
94
27.531915
119
0.678772
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,126
uds-remote-store.hh
NixOS_nix/src/libstore/uds-remote-store.hh
#pragma once ///@file #include "remote-store.hh" #include "remote-store-connection.hh" #include "indirect-root-store.hh" namespace nix { struct UDSRemoteStoreConfig : virtual LocalFSStoreConfig, virtual RemoteStoreConfig { // TODO(fzakaria): Delete this constructor once moved over to the factory pattern // o...
2,413
C++
.h
73
28.041096
85
0.699138
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,127
build-result.hh
NixOS_nix/src/libstore/build-result.hh
#pragma once ///@file #include "realisation.hh" #include "derived-path.hh" #include <string> #include <chrono> #include <optional> namespace nix { struct BuildResult { /** * @note This is directly used in the nix-store --serve protocol. * That means we need to worry about compatability across versions...
3,849
C++
.h
116
25.818966
118
0.624058
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,128
nar-info.hh
NixOS_nix/src/libstore/nar-info.hh
#pragma once ///@file #include "types.hh" #include "hash.hh" #include "path-info.hh" namespace nix { class Store; struct NarInfo : ValidPathInfo { std::string url; std::string compression; std::optional<Hash> fileHash; uint64_t fileSize = 0; NarInfo() = delete; NarInfo(const Store & store, ...
1,234
C++
.h
34
31.5
97
0.675063
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,129
store-reference.hh
NixOS_nix/src/libstore/store-reference.hh
#pragma once ///@file #include <variant> #include "types.hh" namespace nix { /** * A parsed Store URI (URI is a slight misnomer...), parsed but not yet * resolved to a specific instance and query parms validated. * * Supported values are: * * - `local`: The Nix store in /nix/store and database in * /nix/va...
2,376
C++
.h
76
27.578947
96
0.655142
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,130
downstream-placeholder.hh
NixOS_nix/src/libstore/downstream-placeholder.hh
#pragma once ///@file #include "hash.hh" #include "path.hh" #include "derived-path.hh" namespace nix { /** * Downstream Placeholders are opaque and almost certainly unique values * used to allow derivations to refer to store objects which are yet to * be built and for we do not yet have store paths for. * * The...
3,144
C++
.h
82
33.743902
86
0.723878
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,131
sqlite.hh
NixOS_nix/src/libstore/sqlite.hh
#pragma once ///@file #include <functional> #include <string> #include "error.hh" struct sqlite3; struct sqlite3_stmt; namespace nix { enum class SQLiteOpenMode { /** * Open the database in read-write mode. * If the database does not exist, it will be created. */ Normal, /** * Open ...
4,301
C++
.h
148
23.851351
142
0.625213
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,132
common-protocol-impl.hh
NixOS_nix/src/libstore/common-protocol-impl.hh
#pragma once /** * @file * * Template implementations (as opposed to mere declarations). * * This file is an exmample of the "impl.hh" pattern. See the * contributing guide. */ #include "common-protocol.hh" #include "length-prefixed-protocol-helper.hh" namespace nix { /* protocol-agnostic templates */ #defin...
1,201
C++
.h
32
34.53125
126
0.726724
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,133
path.hh
NixOS_nix/src/libstore/path.hh
#pragma once ///@file #include <string_view> #include "types.hh" namespace nix { struct Hash; /** * Check whether a name is a valid store path name. * * @throws BadStorePathName if the name is invalid. The message is of the format "name %s is not valid, for this specific reason". */ void checkName(std::string_...
2,203
C++
.h
74
25.837838
130
0.684736
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,134
remote-fs-accessor.hh
NixOS_nix/src/libstore/remote-fs-accessor.hh
#pragma once ///@file #include "source-accessor.hh" #include "ref.hh" #include "store-api.hh" namespace nix { class RemoteFSAccessor : public SourceAccessor { ref<Store> store; std::map<std::string, ref<SourceAccessor>> nars; bool requireValidPath; Path cacheDir; std::pair<ref<SourceAccessor>...
976
C++
.h
26
33.269231
82
0.72776
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,135
builtins.hh
NixOS_nix/src/libstore/builtins.hh
#pragma once ///@file #include "derivations.hh" namespace nix { // TODO: make pluggable. void builtinFetchurl( const BasicDerivation & drv, const std::map<std::string, Path> & outputs, const std::string & netrcData, const std::string & caFileData); void builtinUnpackChannel( const BasicDerivatio...
382
C++
.h
14
24.214286
49
0.719008
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,136
derived-path-map.hh
NixOS_nix/src/libstore/derived-path-map.hh
#pragma once ///@file #include "types.hh" #include "derived-path.hh" namespace nix { /** * A simple Trie, of sorts. Conceptually a map of `SingleDerivedPath` to * values. * * Concretely, an n-ary tree, as described below. A * `SingleDerivedPath::Opaque` maps to the value of an immediate child * of the root nod...
3,532
C++
.h
92
33.576087
137
0.656049
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,137
length-prefixed-protocol-helper.hh
NixOS_nix/src/libstore/length-prefixed-protocol-helper.hh
#pragma once /** * @file * * Reusable serialisers for serialization container types in a * length-prefixed manner. * * Used by both the Worker and Serve protocols. */ #include "types.hh" namespace nix { struct StoreDirConfig; /** * Reusable serialisers for serialization container types in a * length-prefix...
4,869
C++
.h
142
30.485915
105
0.676577
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,138
s3-binary-cache-store.hh
NixOS_nix/src/libstore/s3-binary-cache-store.hh
#pragma once ///@file #include "binary-cache-store.hh" #include <atomic> namespace nix { struct S3BinaryCacheStoreConfig : virtual BinaryCacheStoreConfig { std::string bucketName; using BinaryCacheStoreConfig::BinaryCacheStoreConfig; S3BinaryCacheStoreConfig(std::string_view uriScheme, std::string_vie...
3,290
C++
.h
98
26.173469
112
0.619349
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,139
content-address.hh
NixOS_nix/src/libstore/content-address.hh
#pragma once ///@file #include <variant> #include "hash.hh" #include "path.hh" #include "file-content-address.hh" #include "variant-wrapper.hh" namespace nix { /* * Content addressing method */ /** * Compute the prefix to the hash algorithm which indicates how the * files were ingested. */ std::string_view mak...
8,399
C++
.h
266
26.454887
102
0.666419
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,140
parsed-derivations.hh
NixOS_nix/src/libstore/parsed-derivations.hh
#pragma once ///@file #include "derivations.hh" #include "store-api.hh" #include <nlohmann/json_fwd.hpp> namespace nix { class ParsedDerivation { StorePath drvPath; BasicDerivation & drv; std::unique_ptr<nlohmann::json> structuredAttrs; public: ParsedDerivation(const StorePath & drvPath, BasicDeri...
1,102
C++
.h
30
32.566667
105
0.746439
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
true
false
false
11,141
derived-path.hh
NixOS_nix/src/libstore/derived-path.hh
#pragma once ///@file #include "path.hh" #include "outputs-spec.hh" #include "config.hh" #include "ref.hh" #include <variant> #include <nlohmann/json_fwd.hpp> namespace nix { struct StoreDirConfig; // TODO stop needing this, `toJSON` below should be pure class Store; /** * An opaque derived path. * * Opaque d...
9,872
C++
.h
268
32.25
86
0.702101
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
11,142
path-regex.hh
NixOS_nix/src/libstore/path-regex.hh
#pragma once ///@file namespace nix { static constexpr std::string_view nameRegexStr = // This uses a negative lookahead: (?!\.\.?(-|$)) // - deny ".", "..", or those strings followed by '-' // - when it's not those, start again at the start of the input and apply the next regex, which is [0-9a-zA-Z\...
382
C++
.h
9
39.222222
127
0.555556
NixOS/nix
12,186
1,472
3,401
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false