mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
keep generated documentation in a separate directory
- helps navigating the code as it highlights which files are generated - makes it less error prone when working incrementally (although this should be just fixed by building out of tree)
This commit is contained in:
parent
3d46fa85c8
commit
44d21f6ef9
5 changed files with 19 additions and 10 deletions
|
@ -1,46 +0,0 @@
|
|||
R"(
|
||||
|
||||
Nix supports different types of stores. These are described below.
|
||||
|
||||
## Store URL format
|
||||
|
||||
Stores are specified using a URL-like syntax. For example, the command
|
||||
|
||||
```console
|
||||
# nix path-info --store https://cache.nixos.org/ --json \
|
||||
/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1
|
||||
```
|
||||
|
||||
fetches information about a store path in the HTTP binary cache
|
||||
located at https://cache.nixos.org/, which is a type of store.
|
||||
|
||||
Store URLs can specify **store settings** using URL query strings,
|
||||
i.e. by appending `?name1=value1&name2=value2&...` to the URL. For
|
||||
instance,
|
||||
|
||||
```
|
||||
--store ssh://machine.example.org?ssh-key=/path/to/my/key
|
||||
```
|
||||
|
||||
tells Nix to access the store on a remote machine via the SSH
|
||||
protocol, using `/path/to/my/key` as the SSH private key. The
|
||||
supported settings for each store type are documented below.
|
||||
|
||||
The special store URL `auto` causes Nix to automatically select a
|
||||
store as follows:
|
||||
|
||||
* Use the [local store](#local-store) `/nix/store` if `/nix/var/nix`
|
||||
is writable by the current user.
|
||||
|
||||
* Otherwise, if `/nix/var/nix/daemon-socket/socket` exists, [connect
|
||||
to the Nix daemon listening on that socket](#local-daemon-store).
|
||||
|
||||
* Otherwise, on Linux only, use the [local chroot store](#local-store)
|
||||
`~/.local/share/nix/root`, which will be created automatically if it
|
||||
does not exist.
|
||||
|
||||
* Otherwise, use the [local store](#local-store) `/nix/store`.
|
||||
|
||||
@stores@
|
||||
|
||||
)"
|
|
@ -31,10 +31,23 @@ src/nix/develop.cc: src/nix/get-env.sh.gen.hh
|
|||
|
||||
src/nix-channel/nix-channel.cc: src/nix-channel/unpack-channel.nix.gen.hh
|
||||
|
||||
src/nix/main.cc: doc/manual/generate-manpage.nix.gen.hh doc/manual/utils.nix.gen.hh doc/manual/generate-settings.nix.gen.hh doc/manual/generate-store-info.nix.gen.hh
|
||||
src/nix/main.cc: \
|
||||
doc/manual/generate-manpage.nix.gen.hh \
|
||||
doc/manual/utils.nix.gen.hh doc/manual/generate-settings.nix.gen.hh \
|
||||
doc/manual/generate-store-info.nix.gen.hh \
|
||||
src/nix/generated-doc/help-stores.md
|
||||
|
||||
src/nix/doc/files/%.md: doc/manual/src/command-ref/files/%.md
|
||||
src/nix/generated-doc/files/%.md: doc/manual/src/command-ref/files/%.md
|
||||
@mkdir -p $$(dirname $@)
|
||||
@cp $< $@
|
||||
|
||||
src/nix/profile.cc: src/nix/profile.md src/nix/doc/files/profiles.md.gen.hh
|
||||
src/nix/profile.cc: src/nix/profile.md src/nix/generated-doc/files/profiles.md.gen.hh
|
||||
|
||||
src/nix/generated-doc/help-stores.md: doc/manual/src/store/types/index.md.in
|
||||
@mkdir -p $$(dirname $@)
|
||||
@echo 'R"(' >> $@.tmp
|
||||
@echo >> $@.tmp
|
||||
@cat $^ >> $@.tmp
|
||||
@echo >> $@.tmp
|
||||
@echo ')"' >> $@.tmp
|
||||
@mv $@.tmp $@
|
||||
|
|
|
@ -297,7 +297,7 @@ struct CmdHelpStores : Command
|
|||
std::string doc() override
|
||||
{
|
||||
return
|
||||
#include "help-stores.md"
|
||||
#include "generated-doc/help-stores.md"
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ them to be rolled back easily.
|
|||
|
||||
)""
|
||||
|
||||
#include "doc/files/profiles.md.gen.hh"
|
||||
#include "generated-doc/files/profiles.md.gen.hh"
|
||||
|
||||
R""(
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue