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,244 | libstore.hh | NixOS_nix/src/libstore-test-support/tests/libstore.hh | #pragma once
///@file
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "store-api.hh"
namespace nix {
class LibStoreTest : public virtual ::testing::Test
{
public:
static void SetUpTestSuite()
{
initLibStore(false);
}
protected:
LibStoreTest()
: store(openStore({
... | 534 | C++ | .h | 27 | 13.777778 | 51 | 0.548 | 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,245 | outputs-spec.hh | NixOS_nix/src/libstore-test-support/tests/outputs-spec.hh | #pragma once
///@file
#include <rapidcheck/gen/Arbitrary.h>
#include <outputs-spec.hh>
#include "tests/path.hh"
namespace rc {
using namespace nix;
template<>
struct Arbitrary<OutputsSpec> {
static Gen<OutputsSpec> arbitrary();
};
}
| 243 | C++ | .h | 12 | 18.416667 | 40 | 0.768889 | 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,246 | protocol.hh | NixOS_nix/src/libstore-test-support/tests/protocol.hh | #pragma once
///@file
#include <nlohmann/json.hpp>
#include <gtest/gtest.h>
#include "tests/libstore.hh"
#include "tests/characterization.hh"
namespace nix {
template<class Proto, const char * protocolDir>
class ProtoTest : public CharacterizationTest, public LibStoreTest
{
std::filesystem::path unitTestData = ... | 2,107 | C++ | .h | 65 | 24.184615 | 94 | 0.585138 | 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,247 | path.hh | NixOS_nix/src/libstore-test-support/tests/path.hh | #pragma once
///@file
#include <rapidcheck/gen/Arbitrary.h>
#include <path.hh>
namespace nix {
struct StorePathName {
std::string name;
};
// For rapidcheck
void showValue(const StorePath & p, std::ostream & os);
}
namespace rc {
using namespace nix;
template<>
struct Arbitrary<StorePathName> {
static G... | 441 | C++ | .h | 22 | 18.045455 | 55 | 0.753056 | 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,248 | derived-path.hh | NixOS_nix/src/libstore-test-support/tests/derived-path.hh | #pragma once
///@file
#include <rapidcheck/gen/Arbitrary.h>
#include <derived-path.hh>
#include "tests/path.hh"
#include "tests/outputs-spec.hh"
namespace rc {
using namespace nix;
template<>
struct Arbitrary<SingleDerivedPath::Opaque> {
static Gen<SingleDerivedPath::Opaque> arbitrary();
};
template<>
struct ... | 708 | C++ | .h | 29 | 22.37931 | 54 | 0.77429 | 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,249 | nix_api_store.hh | NixOS_nix/src/libstore-test-support/tests/nix_api_store.hh | #pragma once
///@file
#include "tests/nix_api_util.hh"
#include "file-system.hh"
#include <filesystem>
#include "nix_api_store.h"
#include "nix_api_store_internal.h"
#include <filesystem>
#include <gtest/gtest.h>
namespace fs { using namespace std::filesystem; }
namespace nixC {
class nix_api_store_test : public n... | 2,019 | C++ | .h | 60 | 27.566667 | 112 | 0.59147 | 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,250 | graphml.hh | NixOS_nix/src/nix-store/graphml.hh | #pragma once
///@file
#include "store-api.hh"
namespace nix {
void printGraphML(ref<Store> store, StorePathSet && roots);
}
| 128 | C++ | .h | 6 | 19.666667 | 59 | 0.754237 | NixOS/nix | 12,186 | 1,472 | 3,401 | LGPL-2.1 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
11,251 | dotgraph.hh | NixOS_nix/src/nix-store/dotgraph.hh | #pragma once
///@file
#include "store-api.hh"
namespace nix {
void printDotGraph(ref<Store> store, StorePathSet && roots);
}
| 129 | C++ | .h | 6 | 19.833333 | 60 | 0.756303 | NixOS/nix | 12,186 | 1,472 | 3,401 | LGPL-2.1 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
11,252 | characterization.hh | NixOS_nix/src/libutil-test-support/tests/characterization.hh | #pragma once
///@file
#include <gtest/gtest.h>
#include "types.hh"
#include "environment-variables.hh"
#include "file-system.hh"
namespace nix {
/**
* The path to the unit test data directory. See the contributing guide
* in the manual for further details.
*/
static inline std::filesystem::path getUnitTestData()... | 2,622 | C++ | .h | 96 | 20.552083 | 79 | 0.582173 | 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,253 | tracing-file-system-object-sink.hh | NixOS_nix/src/libutil-test-support/tests/tracing-file-system-object-sink.hh | #pragma once
#include "fs-sink.hh"
namespace nix::test {
/**
* A `FileSystemObjectSink` that traces calls, writing to stderr.
*/
class TracingFileSystemObjectSink : public virtual FileSystemObjectSink
{
FileSystemObjectSink & sink;
public:
TracingFileSystemObjectSink(FileSystemObjectSink & sink)
: s... | 1,097 | C++ | .h | 33 | 29.69697 | 115 | 0.769886 | 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,254 | nix_api_util.hh | NixOS_nix/src/libutil-test-support/tests/nix_api_util.hh | #pragma once
///@file
#include "nix_api_util.h"
#include <gtest/gtest.h>
namespace nixC {
class nix_api_util_context : public ::testing::Test
{
protected:
nix_api_util_context()
{
ctx = nix_c_context_create();
nix_libutil_init(ctx);
};
~nix_api_util_context() override
{
... | 878 | C++ | .h | 38 | 17.105263 | 66 | 0.536145 | 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,255 | gtest-with-params.hh | NixOS_nix/src/libutil-test-support/tests/gtest-with-params.hh | #pragma once
// SPDX-FileCopyrightText: 2014 Emil Eriksson
//
// SPDX-License-Identifier: BSD-2-Clause
//
// The lion's share of this code is copy pasted directly out of RapidCheck
// headers, so the copyright is set accordingly.
/**
* @file
*
* Implements the ability to run a RapidCheck test under gtest with change... | 2,328 | C++ | .h | 49 | 39.795918 | 100 | 0.551937 | 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,256 | string_callback.hh | NixOS_nix/src/libutil-test-support/tests/string_callback.hh | #pragma once
#include <string>
namespace nix::testing {
void observe_string_cb(const char * start, unsigned int n, void * user_data);
inline void * observe_string_cb_data(std::string & out)
{
return (void *) &out;
};
#define OBSERVE_STRING(str) nix::testing::observe_string_cb, nix::testing::observe_string_cb_da... | 331 | C++ | .h | 10 | 31.2 | 102 | 0.734177 | 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,257 | hash.hh | NixOS_nix/src/libutil-test-support/tests/hash.hh | #pragma once
///@file
#include <rapidcheck/gen/Arbitrary.h>
#include <hash.hh>
namespace rc {
using namespace nix;
template<>
struct Arbitrary<Hash> {
static Gen<Hash> arbitrary();
};
}
| 195 | C++ | .h | 11 | 15.909091 | 37 | 0.748603 | 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,258 | common-eval-args.hh | NixOS_nix/src/libcmd/common-eval-args.hh | #pragma once
///@file
#include "args.hh"
#include "canon-path.hh"
#include "common-args.hh"
#include "search-path.hh"
#include <filesystem>
namespace nix {
class Store;
namespace fetchers { struct Settings; }
class EvalState;
struct EvalSettings;
struct CompatibilitySettings;
class Bindings;
struct SourcePath;
n... | 1,577 | C++ | .h | 52 | 27.884615 | 112 | 0.763963 | 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,259 | markdown.hh | NixOS_nix/src/libcmd/markdown.hh | #pragma once
///@file
#include <string_view>
namespace nix {
/**
* Render the given Markdown text to the terminal.
*
* If Nix is compiled without Markdown support, this function will return the input text as-is.
*
* The renderer takes into account the terminal width, and wraps text accordingly.
*/
std::string ... | 376 | C++ | .h | 13 | 27.153846 | 95 | 0.771588 | 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,260 | installable-derived-path.hh | NixOS_nix/src/libcmd/installable-derived-path.hh | #pragma once
///@file
#include "installables.hh"
namespace nix {
struct InstallableDerivedPath : Installable
{
ref<Store> store;
DerivedPath derivedPath;
InstallableDerivedPath(ref<Store> store, DerivedPath && derivedPath)
: store(store), derivedPath(std::move(derivedPath))
{ }
std::str... | 612 | C++ | .h | 20 | 25.95 | 72 | 0.734134 | 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,261 | misc-store-flags.hh | NixOS_nix/src/libcmd/misc-store-flags.hh | #include "args.hh"
#include "content-address.hh"
namespace nix::flag {
Args::Flag hashAlgo(std::string && longName, HashAlgorithm * ha);
static inline Args::Flag hashAlgo(HashAlgorithm * ha)
{
return hashAlgo("hash-algo", ha);
}
Args::Flag hashAlgoOpt(std::string && longName, std::optional<HashAlgorithm> * oha);
... | 728 | C++ | .h | 18 | 38.833333 | 84 | 0.76662 | 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,262 | installable-flake.hh | NixOS_nix/src/libcmd/installable-flake.hh | #pragma once
///@file
#include "common-eval-args.hh"
#include "installable-value.hh"
namespace nix {
/**
* Extra info about a \ref DerivedPath "derived path" that ultimately
* come from a Flake.
*
* Invariant: every ExtraPathInfo gotten from an InstallableFlake should
* be possible to downcast to an ExtraPathIn... | 2,440 | C++ | .h | 72 | 29.513889 | 97 | 0.713313 | 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,263 | compatibility-settings.hh | NixOS_nix/src/libcmd/compatibility-settings.hh | #pragma once
#include "config.hh"
namespace nix {
struct CompatibilitySettings : public Config
{
CompatibilitySettings() = default;
// Added in Nix 2.24, July 2024.
Setting<bool> nixShellAlwaysLooksForShellNix{this, true, "nix-shell-always-looks-for-shell-nix", R"(
Before Nix 2.24, [`nix-shell`](... | 1,521 | C++ | .h | 25 | 54.76 | 189 | 0.717845 | 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,264 | installable-value.hh | NixOS_nix/src/libcmd/installable-value.hh | #pragma once
///@file
#include "installables.hh"
#include "flake/flake.hh"
namespace nix {
struct PackageInfo;
struct SourceExprCommand;
namespace eval_cache { class EvalCache; class AttrCursor; }
struct App
{
std::vector<DerivedPath> context;
Path program;
// FIXME: add args, sandbox settings, metadat... | 3,311 | C++ | .h | 98 | 28.836735 | 123 | 0.690596 | 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,265 | repl-interacter.hh | NixOS_nix/src/libcmd/repl-interacter.hh | #pragma once
/// @file
#include "finally.hh"
#include "types.hh"
#include <functional>
#include <string>
namespace nix {
namespace detail {
/** Provides the completion hooks for the repl, without exposing its complete
* internals. */
struct ReplCompleterMixin {
virtual StringSet completePrefix(const std::string... | 1,143 | C++ | .h | 40 | 25.65 | 82 | 0.747032 | 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,266 | network-proxy.hh | NixOS_nix/src/libcmd/network-proxy.hh | #pragma once
///@file
#include "types.hh"
namespace nix {
/**
* Environment variables relating to network proxying. These are used by
* a few misc commands.
*
* See the Environment section of https://curl.se/docs/manpage.html for details.
*/
extern const StringSet networkProxyVariables;
/**
* Heuristically ch... | 441 | C++ | .h | 17 | 24.176471 | 80 | 0.775656 | 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,267 | installables.hh | NixOS_nix/src/libcmd/installables.hh | #pragma once
///@file
#include "path.hh"
#include "outputs-spec.hh"
#include "derived-path.hh"
#include "built-path.hh"
#include "store-api.hh"
#include "build-result.hh"
#include <optional>
namespace nix {
struct PackageInfo;
enum class Realise {
/**
* Build the derivation.
*
* Postcondition: t... | 4,937 | C++ | .h | 177 | 23.073446 | 80 | 0.677719 | 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,268 | command-installable-value.hh | NixOS_nix/src/libcmd/command-installable-value.hh | #pragma once
///@file
#include "installable-value.hh"
#include "command.hh"
namespace nix {
/**
* An InstallableCommand where the single positional argument must be an
* InstallableValue in particular.
*/
struct InstallableValueCommand : InstallableCommand
{
/**
* Entry point to this command
*/
... | 473 | C++ | .h | 18 | 23.611111 | 78 | 0.746667 | 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,269 | editor-for.hh | NixOS_nix/src/libcmd/editor-for.hh | #pragma once
///@file
#include "types.hh"
#include "source-path.hh"
namespace nix {
/**
* Helper function to generate args that invoke $EDITOR on
* filename:lineno.
*/
Strings editorFor(const SourcePath & file, uint32_t line);
}
| 236 | C++ | .h | 11 | 19.818182 | 58 | 0.746606 | 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,270 | built-path.hh | NixOS_nix/src/libcmd/built-path.hh | #pragma once
///@file
#include "derived-path.hh"
#include "realisation.hh"
namespace nix {
struct SingleBuiltPath;
struct SingleBuiltPathBuilt {
ref<SingleBuiltPath> drvPath;
std::pair<std::string, StorePath> output;
SingleDerivedPathBuilt discardOutputPath() const;
std::string to_string(const Sto... | 3,107 | C++ | .h | 79 | 35.405063 | 104 | 0.729 | 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,271 | installable-attr-path.hh | NixOS_nix/src/libcmd/installable-attr-path.hh | #pragma once
///@file
#include "globals.hh"
#include "installable-value.hh"
#include "outputs-spec.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
... | 1,265 | C++ | .h | 46 | 23.717391 | 67 | 0.724109 | 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,272 | legacy.hh | NixOS_nix/src/libcmd/legacy.hh | #pragma once
///@file
#include <functional>
#include <map>
#include <string>
namespace nix {
typedef std::function<void(int, char * *)> MainFunction;
struct RegisterLegacyCommand
{
typedef std::map<std::string, MainFunction> Commands;
static Commands * commands;
RegisterLegacyCommand(const std::string ... | 445 | C++ | .h | 18 | 21.388889 | 69 | 0.703088 | NixOS/nix | 12,186 | 1,472 | 3,401 | LGPL-2.1 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
11,273 | command.hh | NixOS_nix/src/libcmd/command.hh | #pragma once
///@file
#include "installable-value.hh"
#include "args.hh"
#include "common-eval-args.hh"
#include "path.hh"
#include "flake/lockfile.hh"
#include <optional>
namespace nix {
extern std::string programPath;
extern char ** savedArgv;
class EvalState;
struct Pos;
class Store;
static constexpr Command:... | 8,796 | C++ | .h | 268 | 29.309701 | 114 | 0.731722 | 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,274 | repl.hh | NixOS_nix/src/libcmd/repl.hh | #pragma once
///@file
#include "eval.hh"
namespace nix {
struct AbstractNixRepl
{
ref<EvalState> state;
Bindings * autoArgs;
AbstractNixRepl(ref<EvalState> state)
: state(state)
{ }
virtual ~AbstractNixRepl()
{ }
typedef std::vector<std::pair<Value*,std::string>> AnnotatedValue... | 1,071 | C++ | .h | 33 | 26.969697 | 102 | 0.670565 | 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,275 | lexer-helpers.hh | NixOS_nix/src/libexpr/lexer-helpers.hh | #pragma once
namespace nix::lexer::internal {
void initLoc(YYLTYPE * loc);
void adjustLoc(yyscan_t yyscanner, YYLTYPE * loc, const char * s, size_t len);
} // namespace nix::lexer
| 184 | C++ | .h | 5 | 35 | 78 | 0.742857 | 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,276 | eval-gc.hh | NixOS_nix/src/libexpr/eval-gc.hh | #pragma once
///@file
#include <cstddef>
#if HAVE_BOEHMGC
# define GC_INCLUDE_NEW
# include <gc/gc.h>
# include <gc/gc_cpp.h>
# include <gc/gc_allocator.h>
#else
# include <memory>
/* Some dummy aliases for Boehm GC definitions to reduce the number of
#ifdefs. */
template<typename T>
using traceable_all... | 762 | C++ | .h | 36 | 19.444444 | 70 | 0.729196 | 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,277 | search-path.hh | NixOS_nix/src/libexpr/search-path.hh | #pragma once
///@file
#include <optional>
#include "types.hh"
#include "comparator.hh"
namespace nix {
/**
* A "search path" is a list of ways look for something, used with
* `builtins.findFile` and `< >` lookup expressions.
*/
struct LookupPath
{
/**
* A single element of a `LookupPath`.
*
* ... | 2,746 | C++ | .h | 90 | 25.811111 | 112 | 0.654663 | 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,278 | print-options.hh | NixOS_nix/src/libexpr/print-options.hh | #pragma once
/**
* @file
* @brief Options for printing Nix values.
*/
#include <limits>
namespace nix {
/**
* How errors should be handled when printing values.
*/
enum class ErrorPrintBehavior {
/**
* Print the first line of the error in brackets: `«error: oh no!»`
*/
Print,
/**
* Th... | 2,852 | C++ | .h | 104 | 22.644231 | 87 | 0.643695 | 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,279 | eval-cache.hh | NixOS_nix/src/libexpr/eval-cache.hh | #pragma once
///@file
#include "sync.hh"
#include "hash.hh"
#include "eval.hh"
#include <functional>
#include <variant>
namespace nix::eval_cache {
struct AttrDb;
class AttrCursor;
struct CachedEvalError : EvalError
{
const ref<AttrCursor> cursor;
const Symbol attr;
CachedEvalError(ref<AttrCursor> cur... | 3,244 | C++ | .h | 114 | 23.929825 | 91 | 0.687824 | 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,280 | print-ambiguous.hh | NixOS_nix/src/libexpr/print-ambiguous.hh | #pragma once
#include "value.hh"
namespace nix {
/**
* Print a value in the deprecated format used by `nix-instantiate --eval` and
* `nix-env` (for manifests).
*
* This output can't be changed because it's part of the `nix-instantiate` API,
* but it produces ambiguous output; unevaluated thunks and lambdas (and... | 588 | C++ | .h | 20 | 26.75 | 79 | 0.707447 | 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,281 | eval-inline.hh | NixOS_nix/src/libexpr/eval-inline.hh | #pragma once
///@file
#include "print.hh"
#include "eval.hh"
#include "eval-error.hh"
#include "eval-settings.hh"
namespace nix {
/**
* Note: Various places expect the allocated memory to be zeroed.
*/
[[gnu::always_inline]]
inline void * allocBytes(size_t n)
{
void * p;
#if HAVE_BOEHMGC
p = GC_MALLOC(n);
... | 3,906 | C++ | .h | 125 | 26 | 120 | 0.630724 | 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,282 | eval-settings.hh | NixOS_nix/src/libexpr/eval-settings.hh | #pragma once
///@file
#include "config.hh"
#include "ref.hh"
namespace nix {
class Store;
struct EvalSettings : Config
{
/**
* Function used to interpet look path entries of a given scheme.
*
* The argument is the non-scheme part of the lookup path entry (see
* `LookupPathHooks` below).
... | 11,463 | C++ | .h | 197 | 49.28934 | 244 | 0.67214 | 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,283 | json-to-value.hh | NixOS_nix/src/libexpr/json-to-value.hh | #pragma once
///@file
#include "error.hh"
#include <string>
namespace nix {
class EvalState;
struct Value;
MakeError(JSONParseError, Error);
void parseJSON(EvalState & state, const std::string_view & s, Value & v);
}
| 224 | C++ | .h | 10 | 20.7 | 73 | 0.763285 | 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,284 | repl-exit-status.hh | NixOS_nix/src/libexpr/repl-exit-status.hh | #pragma once
namespace nix {
/**
* Exit status returned from the REPL.
*/
enum class ReplExitStatus {
/**
* The user exited with `:quit`. The program (e.g., if the REPL was acting
* as the debugger) should exit.
*/
QuitAll,
/**
* The user exited with `:continue`. The program should c... | 365 | C++ | .h | 17 | 17.764706 | 78 | 0.634783 | 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,285 | parser-state.hh | NixOS_nix/src/libexpr/parser-state.hh | #pragma once
///@file
#include <limits>
#include "eval.hh"
namespace nix {
/**
* @note Storing a C-style `char *` and `size_t` allows us to avoid
* having to define the special members that using string_view here
* would implicitly delete.
*/
struct StringToken
{
const char * p;
size_t l;
bool hasIn... | 12,061 | C++ | .h | 304 | 30.615132 | 143 | 0.567602 | 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,286 | primops.hh | NixOS_nix/src/libexpr/primops.hh | #pragma once
///@file
#include "eval.hh"
#include <tuple>
#include <vector>
namespace nix {
/**
* For functions where we do not expect deep recursion, we can use a sizable
* part of the stack a free allocation space.
*
* Note: this is expected to be multiplied by sizeof(Value), or about 24 bytes.
*/
constexpr ... | 1,554 | C++ | .h | 44 | 32.772727 | 91 | 0.740988 | 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,287 | eval-error.hh | NixOS_nix/src/libexpr/eval-error.hh | #pragma once
#include "error.hh"
#include "pos-idx.hh"
namespace nix {
struct Env;
struct Expr;
struct Value;
class EvalState;
template<class T>
class EvalErrorBuilder;
/**
* Base class for all errors that occur during evaluation.
*
* Most subclasses should inherit from `EvalError` instead of this class.
*/
cl... | 3,511 | C++ | .h | 96 | 32.916667 | 111 | 0.723304 | 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,288 | pos-table.hh | NixOS_nix/src/libexpr/pos-table.hh | #pragma once
#include <cstdint>
#include <vector>
#include "pos-idx.hh"
#include "position.hh"
#include "sync.hh"
namespace nix {
class PosTable
{
public:
class Origin
{
friend PosTable;
private:
uint32_t offset;
Origin(Pos::Origin origin, uint32_t offset, size_t size):
... | 2,073 | C++ | .h | 69 | 23.130435 | 83 | 0.592555 | 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,289 | attr-path.hh | NixOS_nix/src/libexpr/attr-path.hh | #pragma once
///@file
#include "eval.hh"
#include <string>
#include <map>
namespace nix {
MakeError(AttrPathNotFound, Error);
MakeError(NoPositionInfo, Error);
std::pair<Value *, PosIdx> findAlongAttrPath(
EvalState & state,
const std::string & attrPath,
Bindings & autoArgs,
Value & vIn);
/**
* H... | 560 | C++ | .h | 19 | 27.105263 | 100 | 0.737336 | 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,290 | nixexpr.hh | NixOS_nix/src/libexpr/nixexpr.hh | #pragma once
///@file
#include <map>
#include <vector>
#include "value.hh"
#include "symbol-table.hh"
#include "eval-error.hh"
#include "pos-idx.hh"
namespace nix {
class EvalState;
class PosTable;
struct Env;
struct ExprWith;
struct StaticEnv;
struct Value;
/**
* A documentation comment, in the sense of [RFC 145... | 15,781 | C++ | .h | 450 | 29.942222 | 138 | 0.641397 | 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,291 | attr-set.hh | NixOS_nix/src/libexpr/attr-set.hh | #pragma once
///@file
#include "nixexpr.hh"
#include "symbol-table.hh"
#include <algorithm>
namespace nix {
class EvalState;
struct Value;
/**
* Map one attribute name to its value.
*/
struct Attr
{
/* the placement of `name` and `pos` in this struct is important.
both of them are uint32 wrappers, th... | 4,595 | C++ | .h | 154 | 24.409091 | 83 | 0.621904 | 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,292 | value.hh | NixOS_nix/src/libexpr/value.hh | #pragma once
///@file
#include <cassert>
#include <span>
#include "eval-gc.hh"
#include "symbol-table.hh"
#include "value/context.hh"
#include "source-path.hh"
#include "print-options.hh"
#include "checked-arithmetic.hh"
#include <nlohmann/json_fwd.hpp>
namespace nix {
struct Value;
class BindingsBuilder;
typede... | 13,051 | C++ | .h | 414 | 25.763285 | 150 | 0.643324 | 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,293 | symbol-table.hh | NixOS_nix/src/libexpr/symbol-table.hh | #pragma once
///@file
#include <list>
#include <map>
#include <unordered_map>
#include "types.hh"
#include "chunked-vector.hh"
#include "error.hh"
namespace nix {
/**
* This class mainly exists to give us an operator<< for ostreams. We could also
* return plain strings from SymbolTable, but then we'd have to wrap... | 3,338 | C++ | .h | 117 | 23.717949 | 91 | 0.640977 | 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,294 | value-to-xml.hh | NixOS_nix/src/libexpr/value-to-xml.hh | #pragma once
///@file
#include "nixexpr.hh"
#include "eval.hh"
#include <string>
#include <map>
namespace nix {
void printValueAsXML(EvalState & state, bool strict, bool location,
Value & v, std::ostream & out, NixStringContext & context, const PosIdx pos);
}
| 269 | C++ | .h | 10 | 25 | 81 | 0.744094 | 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,295 | eval.hh | NixOS_nix/src/libexpr/eval.hh | #pragma once
///@file
#include "attr-set.hh"
#include "eval-error.hh"
#include "types.hh"
#include "value.hh"
#include "nixexpr.hh"
#include "symbol-table.hh"
#include "config.hh"
#include "experimental-features.hh"
#include "position.hh"
#include "pos-table.hh"
#include "source-accessor.hh"
#include "search-path.hh"
... | 27,346 | C++ | .h | 747 | 31.271754 | 174 | 0.675241 | 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,296 | gc-small-vector.hh | NixOS_nix/src/libexpr/gc-small-vector.hh | #pragma once
#include <boost/container/small_vector.hpp>
#include "value.hh"
namespace nix {
/**
* A GC compatible vector that may used a reserved portion of `nItems` on the stack instead of allocating on the heap.
*/
template <typename T, size_t nItems>
using SmallVector = boost::container::small_vector<T, nItem... | 702 | C++ | .h | 22 | 30.227273 | 118 | 0.762259 | 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,297 | value-to-json.hh | NixOS_nix/src/libexpr/value-to-json.hh | #pragma once
///@file
#include "nixexpr.hh"
#include "eval.hh"
#include <string>
#include <map>
#include <nlohmann/json_fwd.hpp>
namespace nix {
nlohmann::json printValueAsJSON(EvalState & state, bool strict,
Value & v, const PosIdx pos, NixStringContext & context, bool copyToStore = true);
void printValueAsJS... | 465 | C++ | .h | 13 | 33.692308 | 106 | 0.753363 | 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,298 | get-drvs.hh | NixOS_nix/src/libexpr/get-drvs.hh | #pragma once
///@file
#include "eval.hh"
#include "path.hh"
#include <string>
#include <map>
namespace nix {
/**
* A "parsed" package attribute set.
*/
struct PackageInfo
{
public:
typedef std::map<std::string, std::optional<StorePath>> Outputs;
private:
EvalState * state;
mutable std::string name;... | 2,818 | C++ | .h | 76 | 32.855263 | 93 | 0.704085 | 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,299 | function-trace.hh | NixOS_nix/src/libexpr/function-trace.hh | #pragma once
///@file
#include "eval.hh"
#include <chrono>
namespace nix {
struct FunctionCallTrace
{
const Pos pos;
FunctionCallTrace(const Pos & pos);
~FunctionCallTrace();
};
}
| 196 | C++ | .h | 12 | 14 | 39 | 0.727778 | 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,300 | print.hh | NixOS_nix/src/libexpr/print.hh | #pragma once
/**
* @file
* @brief Common printing functions for the Nix language
*
* While most types come with their own methods for printing, they share some
* functions that are placed here.
*/
#include <iostream>
#include "fmt.hh"
#include "print-options.hh"
namespace nix {
class EvalState;
struct Value;
... | 2,649 | C++ | .h | 75 | 33.173333 | 106 | 0.723612 | 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,301 | pos-idx.hh | NixOS_nix/src/libexpr/pos-idx.hh | #pragma once
#include <cinttypes>
#include <functional>
namespace nix {
class PosIdx
{
friend struct LazyPosAcessors;
friend class PosTable;
friend class std::hash<PosIdx>;
private:
uint32_t id;
explicit PosIdx(uint32_t id)
: id(id)
{
}
public:
PosIdx()
: id(0)
... | 879 | C++ | .h | 49 | 13.44898 | 58 | 0.601227 | 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,302 | context.hh | NixOS_nix/src/libexpr/value/context.hh | #pragma once
///@file
#include "comparator.hh"
#include "derived-path.hh"
#include "variant-wrapper.hh"
#include <nlohmann/json_fwd.hpp>
namespace nix {
class BadNixStringContextElem : public Error
{
public:
std::string_view raw;
template<typename... Args>
BadNixStringContextElem(std::string_view raw_,... | 1,920 | C++ | .h | 69 | 22.492754 | 92 | 0.634332 | 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,303 | nix_api_external.h | NixOS_nix/src/libexpr-c/nix_api_external.h | #ifndef NIX_API_EXTERNAL_H
#define NIX_API_EXTERNAL_H
/** @ingroup libexpr
* @addtogroup Externals
* @brief Deal with external values
* @{
*/
/** @file
* @brief libexpr C bindings dealing with external values
*/
#include "nix_api_expr.h"
#include "nix_api_util.h"
#include "nix_api_value.h"
#include "stdbool.h"
#... | 6,877 | C++ | .h | 185 | 33.362162 | 120 | 0.696752 | 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,304 | nix_api_expr.h | NixOS_nix/src/libexpr-c/nix_api_expr.h | #ifndef NIX_API_EXPR_H
#define NIX_API_EXPR_H
/** @defgroup libexpr libexpr
* @brief Bindings to the Nix language evaluator
*
* See *[Embedding the Nix Evaluator](@ref nix_evaluator_example)* for an example.
* @{
*/
/** @file
* @brief Main entry for the libexpr C bindings
*/
#include "nix_api_store.h"
#include ... | 9,309 | C++ | .h | 235 | 37.651064 | 119 | 0.72426 | 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,305 | nix_api_value.h | NixOS_nix/src/libexpr-c/nix_api_value.h | #ifndef NIX_API_VALUE_H
#define NIX_API_VALUE_H
/** @addtogroup libexpr
* @{
*/
/** @file
* @brief libexpr C bindings dealing with values
*/
#include "nix_api_util.h"
#include "nix_api_store.h"
#include "stdbool.h"
#include "stddef.h"
#include "stdint.h"
#ifdef __cplusplus
extern "C" {
#endif
// cffi start
// T... | 19,170 | C++ | .h | 479 | 38.006263 | 120 | 0.735806 | 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,306 | nix_api_expr_internal.h | NixOS_nix/src/libexpr-c/nix_api_expr_internal.h | #ifndef NIX_API_EXPR_INTERNAL_H
#define NIX_API_EXPR_INTERNAL_H
#include "fetch-settings.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "attr-set.hh"
#include "nix_api_value.h"
struct EvalState
{
nix::fetchers::Settings fetchSettings;
nix::EvalSettings settings;
nix::EvalState state;
};
stru... | 770 | C++ | .h | 43 | 15.651163 | 42 | 0.739191 | 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,307 | loggers.hh | NixOS_nix/src/libmain/loggers.hh | #pragma once
///@file
#include "types.hh"
namespace nix {
enum class LogFormat {
raw,
rawWithLogs,
internalJSON,
bar,
barWithLogs,
};
void setLogFormat(const std::string & logFormatStr);
void setLogFormat(const LogFormat & logFormat);
void createDefaultLogger();
}
| 281 | C++ | .h | 15 | 16.666667 | 52 | 0.776923 | NixOS/nix | 12,186 | 1,472 | 3,401 | LGPL-2.1 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
11,308 | plugin.hh | NixOS_nix/src/libmain/plugin.hh | #pragma once
///@file
namespace nix {
/**
* This should be called after settings are initialized, but before
* anything else
*/
void initPlugins();
}
| 156 | C++ | .h | 9 | 15.666667 | 67 | 0.743056 | 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,309 | shared.hh | NixOS_nix/src/libmain/shared.hh | #pragma once
///@file
#include "file-descriptor.hh"
#include "processes.hh"
#include "args.hh"
#include "args/root.hh"
#include "common-args.hh"
#include "path.hh"
#include "derived-path.hh"
#include <signal.h>
namespace nix {
int handleExceptions(const std::string & programName, std::function<void()> fun);
/**
*... | 3,968 | C++ | .h | 113 | 32.539823 | 118 | 0.742999 | 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,310 | common-args.hh | NixOS_nix/src/libmain/common-args.hh | #pragma once
///@file
#include "args.hh"
#include "repair-flag.hh"
namespace nix {
//static constexpr auto commonArgsCategory = "Miscellaneous common options";
static constexpr auto loggingCategory = "Logging-related options";
static constexpr auto miscCategory = "Miscellaneous global options";
class MixCommonArgs ... | 1,631 | C++ | .h | 59 | 21.576271 | 105 | 0.627162 | 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,311 | progress-bar.hh | NixOS_nix/src/libmain/progress-bar.hh | #pragma once
///@file
#include "logging.hh"
namespace nix {
Logger * makeProgressBar();
void startProgressBar();
void stopProgressBar();
}
| 145 | C++ | .h | 8 | 16.375 | 27 | 0.778626 | 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,312 | user-env.hh | NixOS_nix/src/nix-env/user-env.hh | #pragma once
///@file
#include "get-drvs.hh"
namespace nix {
PackageInfos queryInstalled(EvalState & state, const Path & userEnv);
bool createUserEnv(EvalState & state, PackageInfos & elems,
const Path & profile, bool keepDerivations,
const std::string & lockToken);
}
| 282 | C++ | .h | 9 | 28.888889 | 69 | 0.761194 | 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,313 | url-name.hh | NixOS_nix/src/libflake/flake/url-name.hh | #include "url.hh"
#include "url-parts.hh"
#include "util.hh"
#include "split.hh"
namespace nix {
/**
* Try to extract a reasonably unique and meaningful, human-readable
* name of a flake output from a parsed URL.
* When nullopt is returned, the callsite should use information available
* to it outside of the URL ... | 656 | C++ | .h | 17 | 36.882353 | 74 | 0.767296 | 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,314 | lockfile.hh | NixOS_nix/src/libflake/flake/lockfile.hh | #pragma once
///@file
#include "flakeref.hh"
#include <nlohmann/json_fwd.hpp>
namespace nix {
class Store;
class StorePath;
}
namespace nix::flake {
typedef std::vector<FlakeId> InputPath;
struct LockedNode;
/**
* A node in the lock file. It has outgoing edges to other nodes (its
* inputs). Only the root node ... | 2,124 | C++ | .h | 68 | 27.073529 | 82 | 0.689349 | 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,315 | flakeref.hh | NixOS_nix/src/libflake/flake/flakeref.hh | #pragma once
///@file
#include <regex>
#include "types.hh"
#include "fetchers.hh"
#include "outputs-spec.hh"
namespace nix {
class Store;
typedef std::string FlakeId;
/**
* A flake reference specifies how to fetch a flake or raw source
* (e.g. from a Git repository). It is created from a URL-like syntax
* (e.... | 3,759 | C++ | .h | 98 | 34.94898 | 112 | 0.715581 | 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,316 | flake.hh | NixOS_nix/src/libflake/flake/flake.hh | #pragma once
///@file
#include "types.hh"
#include "flakeref.hh"
#include "lockfile.hh"
#include "value.hh"
namespace nix {
class EvalState;
namespace flake {
struct Settings;
/**
* Initialize `libnixflake`
*
* So far, this registers the `builtins.getFlake` primop, which depends
* on the choice of `flake:Sett... | 6,298 | C++ | .h | 204 | 26.794118 | 101 | 0.6926 | 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,317 | settings.hh | NixOS_nix/src/libflake/flake/settings.hh | #pragma once
///@file
#include "types.hh"
#include "config.hh"
#include "util.hh"
#include <map>
#include <limits>
#include <sys/types.h>
namespace nix::flake {
struct Settings : public Config
{
Settings();
Setting<bool> useRegistries{
this,
true,
"use-registries",
"Whether... | 1,014 | C++ | .h | 41 | 18.341463 | 80 | 0.603734 | 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,318 | nix_api_main.h | NixOS_nix/src/libmain-c/nix_api_main.h | #ifndef NIX_API_MAIN_H
#define NIX_API_MAIN_H
/**
* @defgroup libmain libmain
* @brief C bindings for nix libmain
*
* libmain has misc utilities for CLI commands
* @{
*/
/** @file
* @brief Main entry for the libmain C bindings
*/
#include "nix_api_util.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#... | 789 | C++ | .h | 36 | 20.305556 | 80 | 0.724967 | 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,319 | nix_api_util.h | NixOS_nix/src/libutil-c/nix_api_util.h | #ifndef NIX_API_UTIL_H
#define NIX_API_UTIL_H
/**
* @defgroup libutil libutil
* @brief C bindings for nix libutil
*
* libutil is used for functionality shared between
* different Nix modules.
* @{
*/
/** @file
* @brief Main entry for the libutil C bindings
*
* Also contains error handling utilities
*/
#ifde... | 9,972 | C++ | .h | 302 | 30.662252 | 119 | 0.709323 | 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,320 | nix_api_util_internal.h | NixOS_nix/src/libutil-c/nix_api_util_internal.h | #ifndef NIX_API_UTIL_INTERNAL_H
#define NIX_API_UTIL_INTERNAL_H
#include <string>
#include <optional>
#include "error.hh"
#include "nix_api_util.h"
struct nix_c_context
{
nix_err last_err_code = NIX_OK;
/** The last error message. Always check last_err_code. This may not have been cleared, so that clearing i... | 1,377 | C++ | .h | 42 | 29.619048 | 120 | 0.693293 | 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,321 | cache.hh | NixOS_nix/src/libfetchers/cache.hh | #pragma once
///@file
#include "fetchers.hh"
#include "path.hh"
namespace nix::fetchers {
/**
* A cache for arbitrary `Attrs` -> `Attrs` mappings with a timestamp
* for expiration.
*/
struct Cache
{
virtual ~Cache() { }
/**
* A domain is a partition of the key/value cache for a particular
* pur... | 2,179 | C++ | .h | 80 | 21.5875 | 70 | 0.614498 | 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,322 | fetchers.hh | NixOS_nix/src/libfetchers/fetchers.hh | #pragma once
///@file
#include "types.hh"
#include "hash.hh"
#include "canon-path.hh"
#include "json-impls.hh"
#include "attrs.hh"
#include "url.hh"
#include <memory>
#include <nlohmann/json_fwd.hpp>
#include "ref.hh"
namespace nix { class Store; class StorePath; struct SourceAccessor; }
namespace nix::fetchers {
... | 7,977 | C++ | .h | 211 | 32.606635 | 111 | 0.682455 | 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,323 | fetch-settings.hh | NixOS_nix/src/libfetchers/fetch-settings.hh | #pragma once
///@file
#include "types.hh"
#include "config.hh"
#include <map>
#include <limits>
#include <sys/types.h>
namespace nix::fetchers {
struct Settings : public Config
{
Settings();
Setting<StringMap> accessTokens{this, {}, "access-tokens",
R"(
Access tokens used to access prote... | 3,420 | C++ | .h | 75 | 36.306667 | 142 | 0.647006 | 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,324 | fetch-to-store.hh | NixOS_nix/src/libfetchers/fetch-to-store.hh | #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 &... | 531 | C++ | .h | 20 | 23.8 | 72 | 0.727273 | 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,325 | store-path-accessor.hh | NixOS_nix/src/libfetchers/store-path-accessor.hh | #pragma once
#include "source-path.hh"
namespace nix {
class StorePath;
class Store;
ref<SourceAccessor> makeStorePathAccessor(ref<Store> store, const StorePath & storePath);
SourcePath getUnfilteredRootPath(CanonPath path);
}
| 233 | C++ | .h | 8 | 27.375 | 89 | 0.835616 | 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,326 | mounted-source-accessor.hh | NixOS_nix/src/libfetchers/mounted-source-accessor.hh | #pragma once
#include "source-accessor.hh"
namespace nix {
ref<SourceAccessor> makeMountedSourceAccessor(std::map<CanonPath, ref<SourceAccessor>> mounts);
}
| 161 | C++ | .h | 5 | 30.4 | 95 | 0.822368 | 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,327 | filtering-source-accessor.hh | NixOS_nix/src/libfetchers/filtering-source-accessor.hh | #pragma once
#include "source-path.hh"
namespace nix {
/**
* A function that returns an exception of type
* `RestrictedPathError` explaining that access to `path` is
* forbidden.
*/
typedef std::function<RestrictedPathError(const CanonPath & path)> MakeNotAllowedError;
/**
* An abstract wrapping `SourceAccesso... | 2,609 | C++ | .h | 70 | 33.042857 | 109 | 0.740961 | 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,328 | attrs.hh | NixOS_nix/src/libfetchers/attrs.hh | #pragma once
///@file
#include "types.hh"
#include "hash.hh"
#include <variant>
#include <nlohmann/json_fwd.hpp>
#include <optional>
namespace nix::fetchers {
typedef std::variant<std::string, uint64_t, Explicit<bool>> Attr;
/**
* An `Attrs` can be thought of a JSON object restricted or simplified
* to be "fla... | 1,176 | C++ | .h | 26 | 43.384615 | 90 | 0.750883 | 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,329 | git-utils.hh | NixOS_nix/src/libfetchers/git-utils.hh | #pragma once
#include "filtering-source-accessor.hh"
#include "fs-sink.hh"
namespace nix {
namespace fetchers { struct PublicKey; }
/**
* A sink that writes into a Git repository. Note that nothing may be written
* until `flush()` is called.
*/
struct GitFileSystemObjectSink : ExtendedFileSystemObjectSink
{
... | 3,272 | C++ | .h | 87 | 31.954023 | 132 | 0.670894 | 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,330 | registry.hh | NixOS_nix/src/libfetchers/registry.hh | #pragma once
///@file
#include "types.hh"
#include "fetchers.hh"
namespace nix { class Store; }
namespace nix::fetchers {
struct Registry
{
const Settings & settings;
enum RegistryType {
Flag = 0,
User = 1,
System = 2,
Global = 3,
Custom = 4,
};
RegistryType... | 1,413 | C++ | .h | 51 | 22.45098 | 87 | 0.659955 | 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,331 | tarball.hh | NixOS_nix/src/libfetchers/tarball.hh | #pragma once
#include <optional>
#include "hash.hh"
#include "path.hh"
#include "ref.hh"
#include "types.hh"
namespace nix {
class Store;
struct SourceAccessor;
}
namespace nix::fetchers {
struct Settings;
struct DownloadFileResult
{
StorePath storePath;
std::string etag;
std::string effectiveUrl;
... | 916 | C++ | .h | 40 | 20.075 | 70 | 0.735566 | 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,354 | mindmapeditorconfig.cpp | vnotex_vnote/src/core/mindmapeditorconfig.cpp | #include "mindmapeditorconfig.h"
#include "mainconfig.h"
#define READSTR(key) readString(appObj, userObj, (key))
#define READBOOL(key) readBool(appObj, userObj, (key))
#define READINT(key) readInt(appObj, userObj, (key))
using namespace vnotex;
MindMapEditorConfig::MindMapEditorConfig(ConfigMgr *p_mgr, IConfig *p_t... | 1,751 | C++ | .cpp | 49 | 31 | 98 | 0.712426 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,360 | pdfviewerconfig.cpp | vnotex_vnote/src/core/pdfviewerconfig.cpp | #include "pdfviewerconfig.h"
#include "mainconfig.h"
#define READSTR(key) readString(appObj, userObj, (key))
#define READBOOL(key) readBool(appObj, userObj, (key))
#define READINT(key) readInt(appObj, userObj, (key))
using namespace vnotex;
PdfViewerConfig::PdfViewerConfig(ConfigMgr *p_mgr, IConfig *p_topConfig)
... | 1,711 | C++ | .cpp | 49 | 30.265306 | 98 | 0.707879 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,387 | pdfbufferfactory.cpp | vnotex_vnote/src/core/buffer/pdfbufferfactory.cpp | #include "pdfbufferfactory.h"
#include "pdfbuffer.h"
#include "urlbasedbufferprovider.h"
using namespace vnotex;
Buffer *PdfBufferFactory::createBuffer(const BufferParameters &p_parameters,
QObject *p_parent)
{
BufferParameters paras;
paras.m_provider = QSharedPointer<... | 571 | C++ | .cpp | 15 | 33.066667 | 95 | 0.742754 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,452 | pdfviewwindow.cpp | vnotex_vnote/src/widgets/pdfviewwindow.cpp | #include "pdfviewwindow.h"
#include <core/vnotex.h>
#include <core/thememgr.h>
#include <core/htmltemplatehelper.h>
#include <core/configmgr.h>
#include <core/editorconfig.h>
#include <core/pdfviewerconfig.h>
#include <utils/pathutils.h>
#include "editors/pdfviewer.h"
#include "editors/pdfvieweradapter.h"
using name... | 3,932 | C++ | .cpp | 138 | 24.478261 | 106 | 0.722651 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,471 | mindmapviewwindow.cpp | vnotex_vnote/src/widgets/mindmapviewwindow.cpp | #include "mindmapviewwindow.h"
#include <QToolBar>
#include <QSplitter>
#include <core/vnotex.h>
#include <core/thememgr.h>
#include <core/htmltemplatehelper.h>
#include <core/configmgr.h>
#include <core/editorconfig.h>
#include <core/mindmapeditorconfig.h>
#include <utils/utils.h>
#include <utils/pathutils.h>
#incl... | 7,652 | C++ | .cpp | 233 | 28.133047 | 116 | 0.71481 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,473 | webviewer.cpp | vnotex_vnote/src/widgets/webviewer.cpp | #include "webviewer.h"
#include "webpage.h"
#include <QWebEnginePage>
#include <utils/utils.h>
using namespace vnotex;
WebViewer::WebViewer(const QColor &p_background,
qreal p_zoomFactor,
QWidget *p_parent)
: QWebEngineView(p_parent)
{
setAcceptDrops(false);
a... | 1,396 | C++ | .cpp | 45 | 25.844444 | 72 | 0.68736 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,499 | notetemplateselector.cpp | vnotex_vnote/src/widgets/dialogs/notetemplateselector.cpp | #include "notetemplateselector.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QComboBox>
#include <QPlainTextEdit>
#include <QPushButton>
#include <core/templatemgr.h>
#include <core/exception.h>
#include <utils/fileutils.h>
#include <utils/widgetutils.h>
#include <widgets/widgetsfactory.h>
using namesp... | 3,139 | C++ | .cpp | 91 | 29.659341 | 111 | 0.713578 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,504 | newnotedialog.cpp | vnotex_vnote/src/widgets/dialogs/newnotedialog.cpp | #include "newnotedialog.h"
#include <QHBoxLayout>
#include <QLineEdit>
#include <QComboBox>
#include <QFormLayout>
#include <QPushButton>
#include <QPlainTextEdit>
#include "notebook/notebook.h"
#include "notebook/node.h"
#include "../widgetsfactory.h"
#include <utils/pathutils.h>
#include <utils/fileutils.h>
#includ... | 5,746 | C++ | .cpp | 147 | 28.918367 | 104 | 0.602299 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,525 | quickaccesspage.cpp | vnotex_vnote/src/widgets/dialogs/settings/quickaccesspage.cpp | #include "quickaccesspage.h"
#include <QVBoxLayout>
#include <QFormLayout>
#include <QGroupBox>
#include <QPlainTextEdit>
#include <QDebug>
#include <QFileDialog>
#include <QCheckBox>
#include <QPushButton>
#include <QComboBox>
#include <QLineEdit>
#include <QInputDialog>
#include <core/sessionconfig.h>
#include <cor... | 11,688 | C++ | .cpp | 283 | 33.597173 | 121 | 0.681325 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,538 | mindmapeditoradapter.cpp | vnotex_vnote/src/widgets/editors/mindmapeditoradapter.cpp | #include "mindmapeditoradapter.h"
using namespace vnotex;
MindMapEditorAdapter::MindMapEditorAdapter(QObject *p_parent)
: WebViewAdapter(p_parent)
{
}
void MindMapEditorAdapter::setData(const QString &p_data)
{
if (isReady()) {
emit dataUpdated(p_data);
} else {
pendAction(std::bind(&Mind... | 979 | C++ | .cpp | 33 | 25.575758 | 91 | 0.701064 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,539 | pdfvieweradapter.cpp | vnotex_vnote/src/widgets/editors/pdfvieweradapter.cpp | #include "pdfvieweradapter.h"
using namespace vnotex;
PdfViewerAdapter::PdfViewerAdapter(QObject *p_parent)
: WebViewAdapter(p_parent)
{
}
void PdfViewerAdapter::setUrl(const QString &p_url)
{
// TODO: Not supported yet.
Q_ASSERT(false);
if (isReady()) {
emit urlUpdated(p_url);
} else {
... | 398 | C++ | .cpp | 16 | 21.1875 | 70 | 0.691293 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
11,542 | pdfviewer.cpp | vnotex_vnote/src/widgets/editors/pdfviewer.cpp | #include "pdfviewer.h"
#include <QWebChannel>
#include "pdfvieweradapter.h"
using namespace vnotex;
PdfViewer::PdfViewer(PdfViewerAdapter *p_adapter,
const QColor &p_background,
qreal p_zoomFactor,
QWidget *p_parent)
: WebViewer(p_background, p_zoom... | 623 | C++ | .cpp | 20 | 25.15 | 68 | 0.677852 | vnotex/vnote | 11,753 | 1,213 | 637 | LGPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.