Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
experimental-features.hh
Go to the documentation of this file.
1#pragma once
3
4#include "nix/util/error.hh"
5#include "nix/util/types.hh"
7
8#include <nlohmann/json_fwd.hpp>
9
10namespace nix {
11
20 CaDerivations,
21 ImpureDerivations,
22 Flakes,
23 FetchTree,
24 NixCommand,
25 GitHashing,
26 RecursiveNix,
27 FetchClosure,
28 AutoAllocateUids,
29 Cgroups,
30 DynamicDerivations,
31 ParseTomlTimestamps,
32 ReadOnlyLocalStore,
34 ConfigurableImpureEnv,
36 VerifiedFetches,
37 PipeOperators,
38 ExternalBuilders,
39 BLAKE3Hashes,
40};
41
46
51const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name);
52
57std::string_view showExperimentalFeature(const ExperimentalFeature);
58
64nlohmann::json documentExperimentalFeatures();
65
69std::ostream & operator<<(std::ostream & str, const ExperimentalFeature & feature);
70
75std::set<ExperimentalFeature> parseFeatures(const StringSet &);
76
81class MissingExperimentalFeature final : public CloneableError<MissingExperimentalFeature, Error>
82{
83 void anchor() override;
84
85public:
90
91 std::string reason;
92
93 MissingExperimentalFeature(ExperimentalFeature missingFeature, std::string reason = "");
94};
95
99template<>
100struct json_avoids_null<ExperimentalFeature> : std::true_type
101{};
102
107void to_json(nlohmann::json &, const ExperimentalFeature &);
108void from_json(const nlohmann::json &, ExperimentalFeature &);
109
110} // namespace nix
ExperimentalFeature missingFeature
Definition experimental-features.hh:89
This file defines two main structs/classes used in nix error handling.
ExperimentalFeature
Definition experimental-features.hh:19
ExperimentalFeature Xp
Definition experimental-features.hh:45
Definition local-overlay-store.hh:125
Definition ssh-store.cc:148
std::set< std::string, std::less<> > StringSet
Definition types.hh:45