Commit graph

585 commits

Author SHA1 Message Date
Valentin Gagarin d37b8a29ce
Merge pull request #8036 from Freed-Wu/patch-1 2023-03-13 14:35:09 +01:00
Eelco Dolstra 6f22e8b7d8
Merge pull request #7486 from fricklerhandwerk/doc-reference
reword definition of "reference"
2023-03-13 14:04:14 +01:00
wzy 5bf4ade0fa
Fix a typo of values.md 2023-03-13 15:34:01 +08:00
Valentin Gagarin 66f49864f3
Merge pull request #7928 from serokell/doc-includes
Documentation: process `#include` directives
2023-03-10 17:06:42 +01:00
Valentin Gagarin 2af9fd20c6 clarify definition of "installable"
the term was hard to discover, as its definition and explanation were in
a very long document lacking an overview section.
search did not help because it occurs so often.

- clarify wording in the definition
- add an overview of installable types
- add "installable" to glossary
- link to definition from occurrences of the term
- be more precise about where store derivation outputs are processed
- installable Nix expressions must evaluate to a derivation

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-03-05 01:46:17 +01:00
Théophane Hufschmitt 1f394d2107
Merge branch 'master' into paths-from-stdin 2023-03-02 19:20:51 +01:00
Eelco Dolstra 96111ad902
Merge pull request #7901 from hercules-ci/disable-tests
Add ./configure --disable-tests option
2023-03-02 10:00:15 +01:00
Alexander Bantyev dd0aab2f94
Documentation: process #include directives 2023-03-01 14:01:45 +04:00
Alexander Bantyev 2fc3a15861
Make nix-env less prominent in manual TOC 2023-03-01 13:54:45 +04:00
John Ericson ea0adfc582 Get rid of .drv special-casing for store path installables
The release notes document the change in behavior, I don't include it
here so there is no risk to it getting out of sync.

> Motivation

>> Plumbing CLI should be simple

Store derivation installations are intended as "plumbing": very simple
utilities for advanced users and scripts, and not what regular users
interact with. (Similarly, regular Git users will use branch and tag
names not explicit hashes for most things.)

The plumbing CLI should prize simplicity over convenience; that is its
raison d'etre. If the user provides a path, we should treat it the same
way not caring what sort of path it is.

>> Scripting

This is especially important for the scripting use-case. when arbitrary
paths are sent to e.g. `nix copy` and the script author wants consistent
behavior regardless of what those store paths are. Otherwise the script
author needs to be careful to filter out `.drv` ones, and then run `nix
copy` again with those paths and `--derivation`. That is not good!

>> Surprisingly low impact

Only two lines in the tests need changing, showing that the impact of
this is pretty light.

Many command, like `nix log` will continue to work with just the
derivation passed as before. This because we used to:

- Special case the drv path and replace it with it's outputs (what this
  gets rid of).

- Turn those output path *back* into the original drv path.

Now we just skip that entire round trip!

> Context

Issue #7261 lays out a broader vision for getting rid of `--derivation`,
and has this as one of its dependencies. But we can do this with or
without that.

`Installable::toDerivations` is changed to handle the case of a
`DerivedPath::Opaque` ending in `.drv`, which is new: it simply doesn't
need to do any extra work in that case. On this basis, commands like
`nix {show-derivation,log} /nix/store/...-foo.drv` still work as before,
as described above.

When testing older daemons, the post-build-hook will be run against the
old CLI, so we need the old version of the post-build-hook to support
that use-case.

Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-28 17:07:05 -05:00
Timothy DeHerrera 639659dec2
doc/manual: add release note for --stdin flag 2023-02-28 12:31:05 -07:00
Timothy DeHerrera df643051e2
nix-store: read paths from standard input
Resolves #7437 for new `nix-store` by adding a `--stdin` flag.
2023-02-28 12:29:16 -07:00
Robert Hensing d0d0b9a748 doc/cli-guideline: Improve examples
Turns out that the settings themselves have a bad data model anyway, so we cut that. They do still occur in the first example, but not in focus.
2023-02-28 16:35:47 +01:00
Robert Hensing 17f70b10bf doc/cli-guideline: Apply suggestions from code review
Thanks Valentin!
2023-02-28 16:35:42 +01:00
Robert Hensing f09ccd8ea9 doc/cli-guideline: Add JSON guideline 2023-02-28 16:35:36 +01:00
Eelco Dolstra 1e07102937 Release notes 2023-02-28 13:44:14 +01:00
Valentin Gagarin 1b49e6fea9
use the term reference correctly 2023-02-27 13:04:54 +01:00
Valentin Gagarin b0c23999d2
add link to definition 2023-02-27 12:56:22 +01:00
Valentin Gagarin ec317949f9
remove "references" as distinct term 2023-02-27 12:55:14 +01:00
Robert Hensing e76619a402 rl-next: Describe fixed flake outPath semantics
The reference documentation already implies the correct semantics.
2023-02-26 14:41:23 +01:00
Robert Hensing c6051cac6f doc: Add test dependencies to prerequisites 2023-02-24 09:59:25 +01:00
Robert Hensing df6829e0d7
Merge pull request #7867 from NixOS/hacking-cross
doc/hacking.md: Corrections and additions for cross
2023-02-20 22:25:55 +01:00
Robert Hensing 807ef8f734
doc/hacking.md: Corrections and additions for cross 2023-02-20 12:20:08 +01:00
John Ericson d7a4f08d42
Nix's own flake: Dedup and memoize more
- `nixpkgsFor` does all of native, static, cross, and the different stdenvs.

- The main Nix derivation is no longer duplicated for static.

- DRY nixpkgs.lib and lib.genAttrs calls.
2023-02-20 11:35:51 +01:00
Théophane Hufschmitt 9a3f66d9d9
Merge pull request #7433 from yorickvP/improv-onboarding
Improve hacking.md and add clangd+bear to devshell
2023-02-20 10:50:08 +01:00
Yorick f2e427942d
Improve hacking.md
- Refer to current version in readme
- Split into flakes and non-flakes section
- Change order to move nix-build to the end, since people often start
  with it in the beginning.
- Use proper "Note" syntax
- Add notes about editor integration
- Move information about target platforms and stdenvs into separate
  sections

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Alexander Bantyev <alexander.bantyev@tweag.io>
Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-02-13 12:00:00 +04:00
Théophane Hufschmitt 9ebbe35817
Merge pull request #5588 from tweag/balsoft/xdg
Follow XDG Base Directory standard
2023-02-10 18:05:50 +01:00
Alexander Bantyev 2384d36083
A setting to follow XDG Base Directory standard
XDG Base Directory is a standard for locations for storing various
files. Nix has a few files which seem to fit in the standard, but
currently use a custom location directly in the user's ~, polluting
it:

- ~/.nix-profile
- ~/.nix-defexpr
- ~/.nix-channels

This commit adds a config option (use-xdg-base-directories) to follow
the XDG spec and instead use the following locations:

- $XDG_STATE_HOME/nix/profile
- $XDG_STATE_HOME/nix/defexpr
- $XDG_STATE_HOME/nix/channels

If $XDG_STATE_HOME is not set, it is assumed to be ~/.local/state.

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
Co-authored-by: Tim Fenney <kodekata@gmail.com>
Co-authored-by: pasqui23 <pasqui23@users.noreply.github.com>
Co-authored-by: Artturin <Artturin@artturin.com>
Co-authored-by: John Ericson <Ericson2314@Yahoo.com>
2023-02-10 20:14:06 +04:00
Pico Geyer a0f1cb0ce7 Fix minor syntax issue in the one of the examples.
Attribute set expressions need to end with a ;
2023-02-10 12:01:44 +02:00
Valentin Gagarin c1921514d4
Merge pull request #7700 from iFreilicht/patch-1
docs: Fix small formatting errors
2023-02-07 23:37:42 +01:00
David Dunn 9aeaf98c4b
Make install command in documentation compatible with fish shell (#7474)
Use a pipe for all install commands

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-07 22:32:27 +00:00
Felix Uhl d910dfe978 docs: Fix formatting of || operator
This is a workaround for
[mdBook#2000](https://github.com/rust-lang/mdBook/issues/2000)
2023-02-07 23:06:14 +01:00
Felix Uhl 32db5e6349 docs: Fix broken anchor link 2023-02-07 23:06:14 +01:00
Eelco Dolstra 1ba13b17db
Merge pull request #7758 from peterbecich/clang11-devshell-documentation
fix documentation for `clang11Stdenv` dev shell
2023-02-07 22:35:31 +01:00
Valentin Gagarin f370a5a26c
Update doc/manual/src/glossary.md
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-02-07 20:40:29 +01:00
Valentin Gagarin 8ab9fdac01
Merge pull request #7768 from ncfavier/fixup-7714 2023-02-07 16:24:19 +01:00
Valentin Gagarin c20394245d add "instantiate" to glossary 2023-02-07 12:09:26 +01:00
Valentin Gagarin e4f12ff482
store paths are not uniquely determined 2023-02-07 11:59:18 +01:00
Naïm Favier 2915db7b28
doc: fixup 7714 2023-02-07 11:38:09 +01:00
Peter Becich b8e96351f7
fix clang11Stdenv dev shell documentation
`clang11StdenvPackages` does not exist

```
│   └───x86_64-linux
│       ├───ccacheStdenv: development environment 'nix'
│       ├───clang11Stdenv: development environment 'nix'
│       ├───clangStdenv: development environment 'nix'
│       ├───default: development environment 'nix'
│       ├───gccStdenv: development environment 'nix'
│       ├───libcxxStdenv: development environment 'nix'
│       └───stdenv: development environment 'nix'
```
2023-02-05 12:00:48 -08:00
Eelco Dolstra 5cbeff64f2
Merge pull request #7607 from Hoverbear/installation-expand
Expand installation.md
2023-02-02 17:05:54 +01:00
Eelco Dolstra 6f0436a337
Merge pull request #7719 from andersk/manual-timestamp
manual: Document that the store timestamp is now 1, not 0
2023-02-01 15:50:36 +01:00
Anders Kaseorg c5d4c50aba manual: Document that the store timestamp is now 1, not 0
Commit 14bc3ce3d6 (0.13~43) changed the
timestamps in the Nix store from 0 to 1.  Update the nix-store man
page to match.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-01-30 23:51:35 -08:00
Naïm Favier 0b3464a107
doc: add __structuredAttrs, outputChecks, unsafeDiscardReferences 2023-01-30 14:49:45 +01:00
Théophane Hufschmitt 7408776b00 Fix the release-notes
Slightly butchered during the merge
2023-01-30 10:32:23 +01:00
Théophane Hufschmitt 4aaf0ee52e
Merge branch 'master' into referenceablePaths 2023-01-30 10:31:00 +01:00
John Ericson f465e378c4
Update doc/manual/src/release-notes/rl-2.13.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-25 08:58:41 -05:00
John Ericson 816031173c Fix the 2.13 changelog
It is just the new CLI that gets the `^` syntax. The old CLI already has
a (slightly different) `!` syntax.

Fixes #7682
2023-01-24 18:53:46 -05:00
Felix Uhl dc4aa383e9 doc: fix anchor links in and to glossary 2023-01-24 00:19:43 +01:00
Robert Hensing 9b56683398
Merge pull request #7447 from aakropotkin/read-file-type
Read file type
2023-01-23 17:37:22 +01:00