Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
experimental-features.hh File Reference
#include "error.hh"
#include "types.hh"
#include <nlohmann/json_fwd.hpp>

Go to the source code of this file.

Classes

class  nix::MissingExperimentalFeature
 

Typedefs

using nix::Xp = ExperimentalFeature
 

Enumerations

enum struct  nix::ExperimentalFeature {
  CaDerivations , ImpureDerivations , Flakes , FetchTree ,
  NixCommand , GitHashing , RecursiveNix , NoUrlLiterals ,
  FetchClosure , AutoAllocateUids , Cgroups , DaemonTrustOverride ,
  DynamicDerivations , ParseTomlTimestamps , ReadOnlyLocalStore , LocalOverlayStore ,
  ConfigurableImpureEnv , MountedSSHStore , VerifiedFetches , PipeOperators
}
 

Functions

const std::optional< ExperimentalFeaturenix::parseExperimentalFeature (const std::string_view &name)
 
std::string_view nix::showExperimentalFeature (const ExperimentalFeature tag)
 
nlohmann::json nix::documentExperimentalFeatures ()
 
std::ostream & nix::operator<< (std::ostream &str, const ExperimentalFeature &feature)
 
std::set< ExperimentalFeaturenix::parseFeatures (const std::set< std::string > &rawFeatures)
 
void nix::to_json (nlohmann::json &j, const ExperimentalFeature &feature)
 
void nix::from_json (const nlohmann::json &j, ExperimentalFeature &feature)
 

Typedef Documentation

◆ Xp

using nix::Xp = ExperimentalFeature

Just because writing ExperimentalFeature::CaDerivations is way too long

Enumeration Type Documentation

◆ ExperimentalFeature

enum struct nix::ExperimentalFeature
strong

The list of available experimental features.

If you update this, don’t forget to also change the map defining their string representation and documentation in the corresponding .cc file as well.

Function Documentation

◆ documentExperimentalFeatures()

nlohmann::json nix::documentExperimentalFeatures ( )

Compute the documentation of all experimental features.

See doc/manual for how this information is used.

◆ operator<<()

std::ostream & nix::operator<< ( std::ostream & str,
const ExperimentalFeature & feature )

Shorthand for str << showExperimentalFeature(feature).

◆ parseExperimentalFeature()

const std::optional< ExperimentalFeature > nix::parseExperimentalFeature ( const std::string_view & name)

Parse an experimental feature (enum value) from its name. Experimental feature flag names are hyphenated and do not contain spaces.

◆ parseFeatures()

std::set< ExperimentalFeature > nix::parseFeatures ( const std::set< std::string > & )

Parse a set of strings to the corresponding set of experimental features, ignoring (but warning for) any unknown feature.

◆ showExperimentalFeature()

std::string_view nix::showExperimentalFeature ( const ExperimentalFeature )

Show the name of an experimental feature. This is the opposite of parseExperimentalFeature().

◆ to_json()

void nix::to_json ( nlohmann::json & ,
const ExperimentalFeature &  )

Semi-magic conversion to and from json. See the nlohmann/json readme for more details.