Skip to content

Commit

Permalink
Gate nix --help sections based on stability
Browse files Browse the repository at this point in the history
This frequent unescaping might not be so nice looking, but we can do it
a different way. The behavior I think is good.
  • Loading branch information
Ericson2314 committed Jan 17, 2023
1 parent 63fc386 commit b16d91f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/nix/nix.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
R""(
(!experimentalFeatureSettings.isEnabled(Xp::Flakes) ? "" : (std::string) R""(

# Examples

Expand Down Expand Up @@ -39,19 +39,25 @@ R""(
Hello, world!
```

)"") + R""(

# Description

Nix is a tool for building software, configurations and other
artifacts in a reproducible and declarative way. For more information,
see the [Nix homepage](https://nixos.org/) or the [Nix
manual](https://nixos.org/manual/nix/stable/).

)"" + (!experimentalFeatureSettings.isEnabled(Xp::NixCommand) ? "" : ((std::string) R""(

# Installables

Many `nix` subcommands operate on one or more *installables*. These are
command line arguments that represent something that can be built in
the Nix store. Here are the recognised types of installables:

)"" + (!experimentalFeatureSettings.isEnabled(Xp::Flakes) ? "" : (std::string) R""(

* **Flake output attributes**: `nixpkgs#hello`

These have the form *flakeref*[`#`*attrpath*], where *flakeref* is a
Expand Down Expand Up @@ -108,6 +114,8 @@ the Nix store. Here are the recognised types of installables:
attributes `packages.x86_64-linux.hello`,
`legacyPackages.x86_64-linux.hello` and `hello`.
)"") + R""(
* **Store paths**: `/nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10`
These are paths inside the Nix store, or symlinks that resolve to a
Expand Down Expand Up @@ -208,6 +216,8 @@ operate are determined as follows:

* Otherwise, Nix will use all outputs of the derivation.

)"")) + R""(

# Nix stores

Most `nix` subcommands operate on a *Nix store*.
Expand Down

0 comments on commit b16d91f

Please sign in to comment.