Commit graph

2421 commits

Author SHA1 Message Date
tomberek
ce4e4a158e
Merge pull request #11344 from kjeremy/flake-show-description-manual
Release note for nix flake show change
2024-08-19 23:50:19 -04:00
tomberek
43e82c9446
Merge pull request #11300 from noamraph/homeless-shelter-to-proc
Make $HOME=/proc/homeless-shelter instead of /homeless-shelter
2024-08-19 23:26:41 -04:00
Jeremy Kolb
2926a859a3 Release note for nix flake show change 2024-08-19 15:15:20 -04:00
tomberek
1ff0a983d6
Merge pull request #11322 from NixOS/eval-cache-doc
doc: Manage expectations for eval-cache
2024-08-19 13:50:15 -04:00
Noam Yorav-Raphael
62b9a26f60 Set $HOME=/proc/homeless-shelter on Linux, and /homeless-shelter on OSX. 2024-08-19 20:18:08 +03:00
Robert Hensing
b52e58903e doc: Manage expectations for eval-cache
Incorrectly high expectations lead to frustration for users who
stick around to experience how useless it is for e.g. a devShell

https://functional.cafe/@arianvp/112976284363120036:

> Flakes doesn't have eval caching. It has command line argument
> caching. It literally just stores the cli argument you passed
> in a sqlite database and yes that's as useless as it sounds

> When I discovered flakes had no expression level caching whatsoever
> I kind of felt lied to and betrayed.
2024-08-19 16:52:36 +02:00
Eelco Dolstra
a90d450827 Fix doc build
Fixes

```
  GEN    /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/manual/index.html
error: File not found: ../store/types/
   ┌─ release-notes/rl-next.md:60:197
   │
60 │   The build hook protocol did in principle support custom ways of remote building, but that can also be accomplished with a custom service for the ssh or daemon/ssh-ng protocols, or with a custom [store type](../store/types/) i.e. `Store` subclass. <!-- we normally don't mention classes, but consider that this release note is about a library use case -->
   │                                                                                                                                                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File not found: ../store/types/

Error: One or more incorrect links
2024-08-19 16:47:57 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-08-19 16:47:57 [ERROR] (mdbook::utils): Error: Rendering failed
2024-08-19 16:47:57 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed
```
2024-08-19 16:48:33 +02:00
Sandro
67de193277
Remove duplicated section (#11324) 2024-08-18 18:44:59 +02:00
Robert Hensing
d4aa7d5dc7 Use nixosTest.quickBuild behavior by default
This wasn't the default behaviour because:

> We don't enable this by default to avoid the mostly unnecessary work of
> performing an additional build of the package in cases where we build
> the package normally anyway, such as in our pre-merge CI.

Since we have a componentized build, we've solved the duplication.

In the new situation, building both with and without unit tests
isn't any slow than just a build with unit tests, so there's no
point in using the unit-tested build anymore.

By using the otherwise untested build, we reduce the minimum build
time towards the NixOS test, at no cost.

If you want to run all tests, build all attributes.
2024-08-16 21:25:48 -04:00
Robert Hensing
06b18cff20
doc: Edit language/operators
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-08-15 18:53:42 +02:00
Robert Hensing
e225b63062 doc: Document function application operator 2024-08-15 13:55:41 +02:00
bryango
612fc76020
doc/manual: fix misaligned icons in custom.css (#11296) 2024-08-14 14:27:12 +02:00
Noam Yorav-Raphael
77d84a8d8b /homeless-shelter -> /proc/homeless/shelter
This makes it so even root can't create $HOME, for example by running `mkdir -p $HOME/.cache/foo`.
2024-08-14 14:35:42 +03:00
Valentin Gagarin
4956e7c44c
add cross-references to nix-path overriding (#11288)
* add cross-references to `nix-path` overriding

while this information is already present in the settings, it's more
likely to be first accessed through the "lookup path" page, which
currently requires following two links to get to the practically
important bits.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-13 19:22:32 +02:00
John Ericson
58b03ef1cd Move NIX_BIN_DIR and all logic using it to the Nix executable itself
This is because with the split packages of the Meson build, we simply
have no idea what directory the binaries will be installed in when we
build the library.

In the process of doing so, consolidate and make more sophisticated the
logic to cope with a few corner cases (e.g. `NIX_BIN_DIR` exists, but no
binaries are inside it).

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-12 12:29:17 -04:00
Robert Hensing
18485d2d53
Merge pull request #11188 from lf-/jade/kill-int-overflow
Ban integer overflow in the Nix language
2024-08-11 04:24:16 +02:00
Robert Hensing
3cc2e2a0ac
Edit docs 2024-08-11 03:31:44 +02:00
tomberek
7354681804
Merge branch 'master' into rhendric/reference-manual-2 2024-08-07 15:25:02 -04:00
Ryan Hendrickson
b291b61089
docs: editorial quibbles (#11232) 2024-08-01 11:14:49 +02:00
Ryan Hendrickson
17318bc70d docs: fix string literal example formatting 2024-07-31 19:22:17 -04:00
Ryan Hendrickson
9e8afc68e5 docs: add language/string-literals.md 2024-07-31 19:07:57 -04:00
Ryan Hendrickson
6ed67d35ed
docs: add variables; rework scope (#11062)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-07-31 21:39:43 +00:00
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
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