Commit graph

1108 commits

Author SHA1 Message Date
Rok Garbas 0d7714b0d7
forgot to add the files 2020-12-08 10:25:03 +01:00
Rok Garbas 24db5b125f
Merge remote-tracking branch 'origin/master' into cli-guideline 2020-12-07 15:13:36 +01:00
regnat 5f66edf245 Make make install less noisy
Remove the printing and useless output of a couple of commands when running `make install`
2020-12-04 14:50:47 +01:00
Eelco Dolstra 8ad2c9c4b9 Remove 'dist' target
We're not producing source tarballs anymore so this has been
bitrotting.
2020-12-03 16:17:58 +01:00
Eelco Dolstra c3c858ac6d Make doc() return arbitrary Markdown rather than the contents of the "Description" section
Thus we can return the examples section (and any other sections) from
doc() and don't need examples() anymore.
2020-12-03 16:17:58 +01:00
Eelco Dolstra e2efc63979 Put examples first in the manpages 2020-12-02 23:23:23 +01:00
Eelco Dolstra 72428e38d9 Generate separate manpages for each nix subcommand 2020-12-02 23:23:23 +01:00
Rok Garbas 44da19f73c
Adds Nix CLI Guideline to docs
As we are working towards Nix 3.0 we want to make sure that we make a
huge step forward in Nix's user experience. And once 3.0 is out of the
door we need to make sure that all future commands and features keep up
the standard of user experience.

This PR adds a CLI guideline document to the Nix documentation. Consider
this document a good starting point and a checklist when somebody will
be (re)implementing commands.

Clearly this guideline does nothing to improve user experience on its
own and can only be useful as long as it is going to be read and
cared for. But it is a first step into that direction.
2020-12-02 17:00:32 +01:00
Fabian Möller 5b0790355f
Fix macOS sandbox build
Since c4c3c15c19 (#4251) building Nix for
macOS with sandboxing fails:
```
getting status of /nix/var/nix/profiles/per-user/root/channels/nixpkgs: Operation not permitted
```

This happens, because `EvalSettings::getDefaultNixPath` tries to access
paths outside the sandbox. Since the state-dir is not required for
doc generation, it is set to the dummy folder. This needs to be done
for all nix invocations during doc generation, as
`EvalSettings::getDefaultNixPath` is called unconditionally.
2020-11-23 17:40:17 +01:00
mkenigs 8b15650e74
docs: consistent console prompt (#4213)
Everywhere else a $ is used
2020-11-02 16:32:05 +01:00
Eelco Dolstra a3a22bd804
Merge pull request #4202 from hercules-ci/nix-shell-doc
Nix shell doc
2020-10-30 11:36:24 +01:00
Robert Hensing d4c5d8d32a nix-shell.md: Extend shellHook example 2020-10-30 11:12:28 +01:00
Robert Hensing b809c48ebb nix-shell.md: evaluated -> run
Use "run" to avoid confusion with Nix evaluation.
"evaluated" was intended to reference bash eval but it's ambiguous.
2020-10-30 11:01:33 +01:00
Eelco Dolstra ff4dea63c9 Generalize extra-* settings
This removes the extra-substituters and extra-sandbox-paths settings
and instead makes every array setting extensible by setting
"extra-<name> = <value>" in the configuration file or passing
"--<name> <value>" on the command line.
2020-10-29 18:17:39 +01:00
tnias c189cf7e33
Add sha512 to hashAlgo listings in manpages (#4186) 2020-10-25 22:16:53 +00:00
Josef Kemetmüller 7f60f48e1a Fix the docs about the new NIX_CONFIG env var
This was accidentally documented as NIX_OPTIONS.
2020-10-21 17:04:36 +02:00
Eelco Dolstra ecfebde6ff
Merge pull request #4166 from kampka/nix-conf-env
Add NIX_CONFIG env var for applying nix.conf overrides
2020-10-21 14:26:45 +02:00
Eelco Dolstra bdf2bcc989 Remove conf-file.xml
This was probably revived in a bad merge.
2020-10-21 14:24:26 +02:00
Christian Kampka 461cf2b856
Add NIX_CONFIG env var for applying nix.conf overrides 2020-10-21 13:41:26 +02:00
Stefan Frijters a53438d18f
doc: nix-shell in pure mode does *not* source user bashrc 2020-10-18 14:26:05 +02:00
Eelco Dolstra 58dadf2954 Remove stray 'Title:' from the manual
Closes #4096.
2020-10-08 17:30:40 +02:00
Fabian Möller 4abd5554ad
Fix macOS sandbox build 2020-10-02 15:40:55 +02:00
Kevin Quick 66c3959e8c
Merge branch 'master' into access-tokens 2020-09-29 08:32:06 -07:00
Maximilian Bosch 3655875483
doc/manual: update hacking docs (#4078)
* By default, build artifacts should be installed into `outputs/` rather
  than `inst/`[1].
* Add instructions on how to run unit-tests.

[1] 733d2e9402
2020-09-27 20:35:03 +00:00
Kevin Quick 83fec38fc9
Update document generation for empty json object values. 2020-09-24 22:41:24 -07:00
Bryan Richter 5fe375a8f1
nix-prefetch-url: Add --executable flag
pkgs.fetchurl supports an executable argument, which is especially nice
when downloading a large executable. This patch adds the same option to
nix-prefetch-url.

I have tested this to work on the simple case of prefetching a little
executable:

1. nix-prefetch-url --executable https://my/little/script
2. Paste the hash into a pkgs.fetchurl-based package, script-pkg.nix
3. Delete the output from the store to avoid any misidentified artifacts
4. Realise the package script-pkg.nix
5. Run the executable

I repeated the above while using --name, as well.

I suspect --executable would have no meaningful effect if combined with
--unpack, but I have not tried it.
2020-09-18 19:09:45 +03:00
Eelco Dolstra 0066ef6c59 Fix doc generation 2020-09-16 16:56:28 +02:00
Eelco Dolstra 39bc49318f jq -> nix 2020-09-16 14:58:06 +02:00
Jade Lovelace 7cb5f643a6
docs+test: fix remaining installer downloads without -L (#4006)
Co-authored-by: lf- <lf-@users.noreply.github.com>
2020-09-12 22:08:40 +02:00
Vladimír Čunát 77d4758cf2
Merge #3982: Minor docs updates 2020-09-07 21:54:59 +02:00
Eelco Dolstra 00d25e8457
Remove the --indirect flag
All GC roots are now indirect.
2020-09-03 11:22:00 +02:00
Cole Helbling a72ed3e8a1
hacking.md: add --prefix flag to configure
Otherwise, the steps advertised in this document won't actually work
(e.g. `make install` will fail, trying to access /usr, and
`./inst/bin/nix` won't exist).
2020-09-01 12:06:02 -07:00
Eelco Dolstra 84f5cabbea Merge remote-tracking branch 'origin/master' into markdown 2020-08-31 14:24:26 +02:00
Domen Kožar 8757e7022a
mention how to run a single functional test for faster feedback loop 2020-08-30 19:41:21 +02:00
Eelco Dolstra 691a1bd717 Merge branch 'minimal-logger' of https://github.com/Ma27/nix 2020-08-28 10:50:52 +02:00
Eelco Dolstra 7a02865b94
Move import docs 2020-08-25 14:06:01 +02:00
Eelco Dolstra 0f314f3c25
Generate builtins section of the manual 2020-08-24 14:49:30 +02:00
Eelco Dolstra a990f063ff
Move primop docs inline
This makes them available to 'nix repl'.
2020-08-24 14:31:10 +02:00
Eelco Dolstra 33b1679d75
Allow primops to have Markdown documentation 2020-08-24 13:16:02 +02:00
Eelco Dolstra dc2f278c95
Allow 'nix' subcommands to provide docs in Markdown format 2020-08-20 12:21:46 +02:00
Eelco Dolstra 3c4f8c9175
List deprecated option aliases in the docs 2020-08-20 11:13:17 +02:00
Eelco Dolstra c3e20d8c28
Consistency 2020-08-19 18:30:17 +02:00
Eelco Dolstra c8fa39324a
Generate the nix.conf docs from the source code
This means we don't have two (divergent) sets of option descriptions
anymore.
2020-08-19 18:28:04 +02:00
Eelco Dolstra 8a97b11374
Improve margins between sections
The default CSS puts almost no space between sections, but a lot of
space between subsections. This flips that around.
2020-08-19 12:31:18 +02:00
Eelco Dolstra 069340179e
Improve nix.1 manpage generator 2020-08-18 15:15:35 +02:00
Eelco Dolstra 6f19c776db
Start generation of the nix.1 manpage 2020-08-17 19:33:18 +02:00
Eelco Dolstra 7cdc739ece
Merge remote-tracking branch 'origin/master' into markdown 2020-08-17 13:43:39 +02:00
Matthew Bauer 641c950701 Add hashed-mirrors back
Some users have their own hashed-mirrors setup, that is used to mirror
things in addition to what’s available on tarballs.nixos.org. Although
this should be feasable to do with a Binary Cache, it’s not always
easy, since you have to remember what "name" each of the tarballs has.
Continuing to support hashed-mirrors is cheap, so it’s best to leave
support in Nix. Note that NIX_HASHED_MIRRORS is also supported in
Nixpkgs through fetchurl.nix.

Note that this excludes tarballs.nixos.org from the default, as in
\#3689. All of these are available on cache.nixos.org.
2020-08-06 18:19:09 -05:00
Eelco Dolstra bf290c2306
Merge remote-tracking branch 'origin/master' into markdown 2020-07-31 16:07:04 +02:00
Eelco Dolstra 2ae9ac2369
console -> shell 2020-07-31 16:02:37 +02:00