Commit graph

2482 commits

Author SHA1 Message Date
Eelco Dolstra
794a50065b base32 -> nix32 2024-07-31 22:33:41 +02:00
Eelco Dolstra
f136ec5290 Add contributors 2024-07-31 22:16:44 +02:00
Eelco Dolstra
22ad0e653f Edit release notes 2024-07-31 22:14:27 +02:00
Eelco Dolstra
c952d933e5 release notes: 2.24.0 2024-07-31 21:57:31 +02:00
Valentin Gagarin
db5bacb637
reword documentation on nix-path config option (#7772)
* docs: unify documentation on search paths

- put all the information on search path semantics into `builtins.findFile`
- put all the information on determining the value of `builtins.nixPath` into the
  `nix-path` setting

  maybe `builtins.nixPath` is a better place for this, but those bits
  can still be moved around now that it's all next to each other.
- link to the syntax page for lookup paths from all places that are
  concerned with it
- add or clarify examples
- add a test verifying a claim from documentation
2024-07-31 21:41:26 +02:00
Eelco Dolstra
69fb2848a5
Merge pull request #11170 from NixOS/release-notes-2.24
Release notes for 2.24
2024-07-31 17:06:49 +02:00
Jade Lovelace
5878b1475f doc: release notes for banning integer overflow
Change-Id: Ib75ab5b8b4d879035d7ee7678f9cd0c491a39c0a
2024-07-30 18:13:05 -07:00
Jade Lovelace
bf050d9e96 docs: update to define integer overflow
Change-Id: Ie8a1b31035f2d27a220e5df2e9e178ec3b39ee68
2024-07-30 18:13:05 -07:00
Corbin Simpson
ee86e7f361
doc/command-ref/nix-shell: Shebangs can occur anywhere (#11202)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-07-30 12:51:47 +00:00
Eelco Dolstra
e8bf2e74a5 Add release note 2024-07-29 15:09:06 +02:00
Robert Hensing
aa2b1d10e2
Update doc/manual/rl-next/10734-nix3-build-show-all-fod-errors-with-keep-going.md 2024-07-27 14:58:57 +02:00
Cole Helbling
6e178cd899 Fix reference to experimental features docs
Arose because https://github.com/NixOS/nix/pull/9014 merged before
https://github.com/NixOS/nix/pull/11131, but the latter did not rebase /
merge against the latest master.
2024-07-25 11:38:45 -07:00
Robert Hensing
6ec123ad6b
Merge pull request #11131 from rhendric/rhendric/pipe-operators
libexpr: experimental pipe operators
2024-07-25 16:58:43 +02:00
Robert Hensing
f0fe1d880d
Update doc/manual/rl-next/10734-nix3-build-show-all-fod-errors-with-keep-going.md
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-07-25 15:39:15 +02:00
Robert Hensing
b711fcbef9 rl-next: Drop zzz-other. Number soup. 2024-07-25 06:00:59 +02:00
Robert Hensing
7275d68d3b rl-next: Add top 10 by +1 reactions on PRs
We should use a metric that weighs the related issues.
Counterbalancing time doesn't make much sense to me.
If it's around for longer, the fix will be relevant to more people.
2024-07-25 05:57:53 +02:00
Robert Hensing
8a7e31362a rl-next: Add credit 2024-07-25 05:57:06 +02:00
Valentin Gagarin
a2fed6db9e
manual: Contributing -> Development, Hacking -> Building (#9014)
* manual: Contributing -> Development, Hacking -> Building

what's currently called "hacking" are really instructions for setting up
a development environment and compiling from source. we have
a contribution guide in the repo (which rightly focuses on GitHub
workflows), and the material in the manual is more about working
on the code itself.

since we'd otherwise have three headings that amount to "Building Nix",
this change also moves the "classic Nix" instructions to the top.

we may want to reorganise this in the future, and bring
contributor-oriented information closer to the code, but for now let's
stick to more accurate names to ease navigation.
2024-07-25 02:53:06 +00:00
Valentin Gagarin
dba1142c01
docs: add identifiers (#11174)
* docs: add identifiers

* clarify attribute set notation and add examples

* add definition of names

Co-authored-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
2024-07-25 03:45:34 +02:00
Robert Hensing
4bfc96f376 Fix and update release notes 2024-07-24 19:36:49 +02:00
Ryan Hendrickson
e086d5d899 libexpr: experimental pipe operators 2024-07-24 13:17:28 -04:00
Eelco Dolstra
ca0f7db843 Remove hacks to support evaluation from coroutines
Since we're not doing this anymore.
2024-07-24 16:43:25 +02:00
Eelco Dolstra
17051ca80a
Merge pull request #11061 from rhendric/rhendric/reference-manual
docs: fill out language/types.md#type-path
2024-07-17 21:59:05 +02:00
Eelco Dolstra
1e1a8e8ad1
Merge pull request #11058 from hercules-ci/more-nix-shell
Make `#!nix-shell` arguments and options relative to script
2024-07-17 21:52:34 +02:00
RTUnreal
f0a1c130a1
doc: add example usage for Gitea in tarball fetcher (#11116)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-07-17 19:08:33 +00:00
Robert Hensing
d4f576b0b2 nix repl: Render docs for attributes 2024-07-15 19:56:40 +02:00
Robert Hensing
7fae378835 Track doc comments and render them in :doc 2024-07-15 19:56:40 +02:00
Robert Hensing
63f520fd00 doc/testing: Typo 2024-07-15 18:41:11 +02:00
Andrew Marshall
51a12b38bd Fix stackoverflow during doc generation
On some systems, previous usage of `match` may cause a stackoverflow
(presumably due to the large size of the match result). Avoid this by
(ab)using `replaceStrings` to test for containment without using
regexes, thereby avoiding the issue. The causal configuration seems to
be the stack size hard limit, which e.g. Amazon Linux sets, whereas most
Linux distros leave unlimited.

Match the fn name to similar fn in nixpkgs.lib, but different
implementation that does not use `match`. This impl gives perhaps
unexpected results when the needle is `""`, but the scope of this is
narrow and that case is a bit odd anyway.

This makes for some duplication-of-work as we do a different
`replaceStrings` if this one is true, but this only runs during doc
generation at build time so has no runtime impact.

See https://github.com/NixOS/nix/issues/11085 for details.
2024-07-12 10:59:40 -04:00
Robert Hensing
6f5f741157 doc/rl-next/shebang-relative: Update with example 2024-07-11 13:52:03 +02:00
Robert Hensing
d942d505ca Merge remote-tracking branch 'upstream/master' into more-nix-shell 2024-07-10 16:19:18 +02:00
Robert Hensing
cfe3ee3de8
nix-shell: look up shell.nix when argument is a directory (#11057)
* Refactor: rename runEnv -> isNixShell

* Refactor: rename left -> remainingArgs

* nix-build.cc: Refactor: extract baseDir variable

* nix-build.cc: Refactor: extract sourcePath, resolvedPath variables

* nix-shell: Look for shell.nix when directory is specified

* Add legacy setting: nix-shell-always-looks-for-shell-nix

* rl-next: Add note about shell.nix lookups

* tests/functional/shell.nix: Implement runHook for dummy stdenv
2024-07-08 14:36:36 +02:00
Ryan Hendrickson
48804cffbf docs: fill out language/types.md#type-path 2024-07-08 00:41:19 -04:00
Ryan Hendrickson
95890b3e1d docs: merge builtin-constants into builtins 2024-07-07 15:57:23 -04:00
Robert Hensing
63262e78c7 Add opt-out: nix-shell-shebang-arguments-relative-to-script 2024-07-07 00:55:33 +02:00
Robert Hensing
d5854f33e2 rl-next: Typo 2024-07-07 00:18:26 +02:00
Robert Hensing
8838f5c746 Merge remote-tracking branch 'matthewbauer/nix-shell-relative-shebang' into more-nix-shell 2024-07-07 00:18:03 +02:00
Robert Hensing
afbe7c3d08 rl-next: Enter PR 2024-07-06 23:15:01 +02:00
Robert Hensing
a22f8b5276 rl-next: Add note about shell.nix lookups 2024-07-06 23:05:34 +02:00
Robert Hensing
ddff76f667
Merge pull request #10973 from NixOS/meson-libexpr
Meson build for libexpr libflake, external C API, unit tests
2024-07-05 20:27:12 +02:00
Valentin Gagarin
a713476790
docs: split types from syntax (#11013)
move together all syntactic and semantic information into one
page, and add a page on data types, which in turn links to the syntax and
semantics.

also split out the note on scoping rules into its own page.

Co-authored-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
2024-07-03 09:03:41 +02:00
John Ericson
11dab30be9 Update docs on the unit tests 2024-07-02 09:26:22 -04:00
John Ericson
496b4a9cd2 Move around unit test dirs to match new names 2024-07-02 09:26:22 -04:00
John Ericson
17a8c2bfce Unit tests and external libraries 2024-07-02 09:23:24 -04:00
Sergei Trofimovich
5a16bf86c5
doc: fix directory definition in nix-archive.md (#10997)
* doc: fix `directory` definition in nix-archive.md

Before the change the document implied that directory of a single entry
contained entry:

    "type" "directory" "type" directory" "entry" ...

After the change document should expand into:

   "type" "directory" "entry" ...

Co-authored-by: John Ericson <git@JohnEricson.me>
2024-06-30 16:22:04 +00:00
Valentin Gagarin
b44909ac22
add many more examples on escaping in strings (#10974) 2024-06-27 10:58:59 +02:00
Harmen
3b388f6629
string interpolation escape example (#10966)
* string interpolation escape example

Make it easier to find the documentation, and the example might be enough for most cases.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-06-27 08:30:21 +00:00
Winter
149d8eb8aa Stop vendoring toml11
We don't apply any patches to it, and vendoring it locks users into
bugs (it hasn't been updated since its introduction in late 2021).

Closes https://git.lix.systems/lix-project/lix/issues/164

Change-Id: Ied071c841fc30b0dfb575151afd1e7f66970fdb9
(cherry picked from commit 80405d06264f0de1c16ee2646388ab501df20628)
2024-06-26 22:27:13 -04:00
John Ericson
32e67eba8b Remove invalid release notes YAML field
There is no PR for this, since it was an embargoed fix before
disclosure.
2024-06-26 19:35:57 -04:00
John Ericson
8a420162ab Merge branch 'master' into fix-sandbox-escape 2024-06-26 18:11:39 -04:00
Robert Hensing
052f1320dd
Merge pull request #10960 from rhendric/rhendric/reference-manual
docs: internal documentation touchup
2024-06-26 01:16:45 +02:00
Ryan Hendrickson
fba81cf74b docs: internal documentation touchup
Make two comments more accurate for the next reader.
2024-06-25 18:44:56 -04:00
Robert Hensing
602c444411 Merge remote-tracking branch 'upstream/master' into functional-tests-on-nixos 2024-06-24 18:07:21 +02:00
Robert Hensing
6f64154eea
Merge pull request #10884 from tomberek/tomberek.warn_structuredAttrs_advanced
fix: warn and document when advanced attributes will have no impact d…
2024-06-24 07:56:26 +02:00
Théophane Hufschmitt
d99c868b04 Add a release note for the build-dir hardening 2024-06-21 17:06:19 +02:00
Robert Hensing
fca160fbcd doc/contributing/testing: Describe functional VM tests and quickBuild 2024-06-20 14:54:11 +02:00
Valentin Gagarin
1c131ec2b7
Port C API docs to Meson (#10936)
* Port C API docs to Meson

* don't cross-compile the docs
2024-06-19 22:43:54 +02:00
John Ericson
0c6029669d
Merge pull request #10935 from fricklerhandwerk/cli-docs-formatting
use separate paragraphs inside list items
2024-06-18 15:24:44 -04:00
Valentin Gagarin
b975151c09 dedent lists
this indentation is unnecessary and probably an artefact from the
migration off XML.
2024-06-18 11:26:09 +02:00
Valentin Gagarin
6e34c68327 Convert the internal API doc build to Meson 2024-06-17 15:51:58 -04:00
Valentin Gagarin
4f340213bb use separate paragraphs inside list items 2024-06-17 17:55:29 +02:00
Valentin Gagarin
d1dd7abbf0
mention the actual meaning of FODs in the glossary (#10888)
* mention the actual meaning of FODs in the glossary

Co-authored-by: Alex Groleau <source@proof.construction>
Co-authored-by: Daniel Baker <daniel.n.baker@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-10 20:50:35 +02:00
Tom Bereknyei
4809e59b7e fix: warn and document when advanced attributes will have no impact due to __structuredAttrs 2024-06-10 09:31:21 -04:00
Eelco Dolstra
b36aa04b53
Merge pull request #10836 from edolstra/release-notes
2.23 release notes
2024-06-04 13:00:06 +02:00
Eli Flanagan
bf72b78ef2
docs: fix python nix-shell example (#10841)
* docs: fix python nix-shell example

This Python code snippet depended on Python 2 which has been marked as insecure in 24.05.

I modernized the example so new users will not be surprised upon copying and pasting the snippet for exploration.

Co-authored-by: John Ericson <git@JohnEricson.me>
2024-06-03 23:22:50 +02:00
Eelco Dolstra
e0885fc216 Fix link 2024-06-03 20:02:03 +02:00
Robert Hensing
9019b7a37a doc/rl-2.23.md: Fix broken link 2024-06-03 18:56:04 +02:00
Eelco Dolstra
879089e80d Edit release notes 2024-06-03 18:13:37 +02:00
Eelco Dolstra
754ea9058d release notes: 2.23.0 2024-06-03 18:06:42 +02:00
Eelco Dolstra
da92ad7dd2
Merge pull request #10592 from hercules-ci/builtins-warn
Add `builtins.warn`
2024-06-03 17:16:32 +02:00
Robert Hensing
3a0b0af2ac Fix typo in doc/manual/rl-next/builtins-warn.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-06-03 16:24:21 +02:00
Robert Hensing
70b1036224 builtins.warn: Use new EvalBaseError + "evaluation warning" 2024-06-03 16:24:21 +02:00
Eelco Dolstra
54a9fbe5d6 Merge remote-tracking branch 'origin/master' into large-path-warning 2024-06-03 16:17:52 +02:00
Eelco Dolstra
ac3e5d22e3
Merge pull request #10028 from DavHau/fetchTree-shallow-default
fetchTree: shallow git fetching by default
2024-06-03 16:02:34 +02:00
Eelco Dolstra
d2bfc7e55a Add release note 2024-06-03 15:55:19 +02:00
John Ericson
84c65135a5 ValidPathInfo JSON format should use null not omit field
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-03 08:21:22 -04:00
John Ericson
c50e14276e manual: Extend JSON guidlines with optional field info
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-06-03 08:21:18 -04:00
John Ericson
57aa901071 manual: Put the JSON guideline on its own page 2024-06-03 08:11:02 -04:00
Robert Hensing
c692f6af13 nix env shell: Move from nix shell, add shorthand alias 2024-05-30 19:41:58 +02:00
Qyriad
18ac6545fc print type and value in "flake attr is not a derivation" errors
This turns errors like:

error: flake output attribute 'hydraJobs' is not a derivation or path

into errors like:

error: expected flake output attribute 'hydraJobs' to be a derivation or
path but found a set: { binaryTarball = «thunk»; build = «thunk»; etc> }

This change affects all InstallableFlake commands.

Source: 20981461d4
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-29 20:51:32 +02:00
Jörg Thalheim
e2182d07d9 fixup extension of changelog entry 2024-05-29 20:51:32 +02:00
Martin Joerg
e7ea5591a2 fix typos 2024-05-27 15:56:52 +02:00
Robert Hensing
bd7a074636
Merge pull request #10724 from prednaz/libexpr-c_example
remove redundant and outdated example from `libexpr-c` documentation
2024-05-22 12:59:14 +02:00
Valentin Gagarin
77cb02b739
reword documentation on nix-copy-closure (#10709)
* reword documentation on `nix-copy-closure`

- one sentence per line
- be more precise with respect to which Nix stores are being accessed
- make a clear distinction between store paths and store objects
- add links to definitions of terms
- clarify which machine is which
- --to and --from don't take arguments

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-21 18:06:16 +02:00
Valentin Gagarin
117dbc2c46 add examples of comments
make a suggestion for what to do if one wants to write nested comments
2024-05-21 16:49:46 +02:00
Philipp Zander
142222030c remove redundant and outdated example from libexpr-c documentation 2024-05-21 14:00:34 +02:00
Valentin Gagarin
40b7fb4f11
expand example on nix-copy-closure (#10708)
* expand example on nix-copy-closure


Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-20 20:45:45 +00:00
Valentin Gagarin
fc14378ae3
add cross-references for discoverability (#10714) 2024-05-20 20:39:34 +00:00
Robert Hensing
8953bdbf32
Merge pull request #10715 from fricklerhandwerk/remove-copy-closure-guide
redirect "Copying Closures via SSH" guide to `nix-copy-closure`
2024-05-20 18:10:27 +02:00
Robert Hensing
67db9e0c64
Merge pull request #10722 from obsidiansystems/ca-obj-docs
Content addressing store objects
2024-05-20 15:58:29 +02:00
John Ericson
4c91bc543c Remove store object content address reproducibility section 2024-05-20 09:34:38 -04:00
John Ericson
1c75af969a Document store object content addressing & improve JSON format
The JSON format no longer uses the legacy ATerm `r:` prefixing nonsese,
but separate fields.

Progress on #9866

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-20 09:34:35 -04:00
Robert Hensing
e4be8abe42
Merge pull request #10701 from cole-h/nix-command-warn-unknown-settings
Warn on unknown settings when the first positional is an argument
2024-05-20 15:15:13 +02:00
Valentin Gagarin
209d75529c
reword documentation on nix-store --export (#10713)
- add links to definitions of terms
- one sentence per line
- be more specific about which store is used for the import
- clearly distinguish store paths and store objects
- make a recommendation to use `nix-copy-closure` for efficient SSH transfers
2024-05-20 08:28:35 +02:00
tomberek
7cb3c80bb5
Merge pull request #10711 from fricklerhandwerk/nix-store-export-example
make a more relevant example for `nix-store --export`
2024-05-19 13:29:54 -04:00
tomberek
6193737ca1
Merge pull request #10710 from fricklerhandwerk/nix-store-import-example
add example to `nix-store --import`
2024-05-19 13:27:36 -04:00
Maximilian Bosch
19720d733f nix3-build: show all FOD errors with --keep-going
Basically I'd expect the same behavior as with `nix-build`, i.e.
with `--keep-going` the hash-mismatch error of each failing
fixed-output derivation is shown.

The approach is derived from `Store::buildPaths` (`entry-point.cc`):
instead of throwing the first build-result, check if there are any build
errors and if so, display all of them and throw after that.

Unfortunately, the BuildResult struct doesn't have an `ErrorInfo`
(there's a FIXME for that at least), so I have to construct my own here.
This is a rather cheap bugfix and I decided against touching too many
parts of libstore for that (also I don't know if that's in line with the
ongoing refactoring work).

Closes https://git.lix.systems/lix-project/lix/issues/302

Change-Id: I378ab984fa271e6808c6897c45e0f070eb4c6fac
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-17 18:48:52 +02:00
fidgetingbits
c66796d460
fix typo in testing documentation 2024-05-17 08:38:57 +08:00
Philipp Zander
449404531d fix "Embedding the Nix Evaluator" c api example 2024-05-16 00:39:39 +02:00
Robert Hensing
303268bb71
Merge pull request #10479 from obsidiansystems/ca-fso-docs
Document file system object content addressing
2024-05-15 22:52:53 +02:00