aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2024-07-30src/libcmd/repl.cc: avoid unneeded reload after :eGoldstein
If `:edit`ing a store path, don't reload repl afterwards to avoid losing local variables: store is immutable, so "editing" a store path is always just viewing it. Resolves: https://git.lix.systems/lix-project/lix/issues/341 Change-Id: I3747f75ce26e0595e953069c39ddc3ee80699718
2024-07-25libstore/build: block io_uringAlois Wohlschlager
Unfortunately, io_uring is totally opaque to seccomp, and while currently there are no dangerous operations implemented, there is no guarantee that it remains this way. This means that io_uring should be blocked entirely to ensure that the sandbox is future-proof. This has not been observed to cause issues in practice. Change-Id: I45d3895f95abe1bc103a63969f444c334dbbf50d
2024-07-19Merge changes Id8b3d289,Ib75ab5b8,I3792eeb3 into mainjade
* changes: Fixup a bunch of references to nixos.org manuals Add release notes for removing overflow from Nix language expr: fix a compiler warning about different signs in comparison
2024-07-19Merge changes I829581a3,I0016970d,I5dac8e77,Ib7560fe5 into mainalois31
* changes: doc/release-notes: add for pretty printing improvements libexpr/print: do not show elided nested items when there are none libexpr/print: never show empty attrsets or derivations as «repeated» libexpr/print: pretty-print idempotently
2024-07-18Fixup a bunch of references to nixos.org manualsJade Lovelace
(plus one reference to CppNix github) Change-Id: Id8b3d2897f3b54e286861805cfd421adc4d5de47
2024-07-18Add release notes for removing overflow from Nix languageJade Lovelace
Change-Id: Ib75ab5b8b4d879035d7ee7678f9cd0c491a39c0a
2024-07-18Merge changes Ib20e9aa0,I178a038b,I29c7de04 into mainjade
* changes: docs: document the actual comparison rules instead of lies daemon: remove workaround for macOS kernel bug that seems fixed daemon: fix a crash bug "FATAL: exception not rethrown"
2024-07-18doc/release-notes: add for pretty printing improvementsAlois Wohlschlager
Change-Id: I829581a3f5b8b742e6c866dcdbbc635f91afceb5
2024-07-18Merge "doc/manual: clarify documentation related to the `$$` parser bug" ↵alois31
into main
2024-07-17doc/release-notes: link the upcoming release notes againAlois Wohlschlager
The insertion marker comment broke the list into two parts, the first containing only the link to the upcoming release notes and the second the past releases. This confused the generator, leading to the first part being discarded. Indent the marker comment so that it's syntactically part of the preceding item, and in particular doesn't split the list any more. Change-Id: I357c51bb03e4e0d79a76d30158615fd9eda95ea8
2024-07-17doc/release-notes: add date for major releaseRaito Bezarius
Change-Id: I93aab93c069bb3989c3f8d17e0862899e6f76865 Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-07-17doc/manual: clarify documentation related to the `$$` parser bugAlois Wohlschlager
Due to a mistake in the grammar, a dollar character implicitly escapes a second dollar character that immediately follows, so that it cannot start an interpolation. Unfortunately, this behaviour has since come to be relied upon, so it cannot be fixed. Furthermore, the documentation on regular strings did not mention this behaviour at all, while in the case of indented strings it was rather implicit. Mention it explicitly in both cases, and describe how an interpolation can follow a dollar character (namely, by escaping that). Since we have to touch that section anyway, state that any character (other than n, r, and t; but notably including `$` even if not succeeded by `{`) can be escaped using a backslash in regular strings. Change-Id: I7e5d68a9a4130eec98ce8218b485168f4b31a677
2024-07-13docs: document the actual comparison rules instead of liesJade Lovelace
Although the comparison rules are ugly and we do not like various parts of them, we must not hide them away for only catgirls to know about, so the documentation should actually say how they work. Change-Id: Ib20e9aa0e7b6486ade4f401035aafd85fbb08c91
2024-07-13docs: update to define integer overflowJade Lovelace
Change-Id: Ie8a1b31035f2d27a220e5df2e9e178ec3b39ee68
2024-07-10Merge changes I81552018,Ieb65c133 into maineldritch horrors
* changes: releng: add releaseTests flake output, test script add aarch64-linux as a cross-build target
2024-07-09add aarch64-linux as a cross-build targeteldritch horrors
we want to be sure we can cross-build to aarch64 for releases, add a target to our crossSystems list to make those cheacks easier to run. Change-Id: Ieb65c1333a5232641ace0ba4d122fc7d528ebc04
2024-07-09Fix dry-run flag for nix-collect-garbageQuantum Jump
`nix-collect-garbage --dry-run` previously elided the entire garbage collection check, meaning that it would just exit the script without printing anything. This change makes the dry run flag instead set the GC action to `gcReturnDead` rather than `gcDeleteDead`, and then continue with the script. So if you set `--dry-run`, it will print the paths it *would* have garbage collected, but not actually delete them. I filed a bug for this: https://git.lix.systems/lix-project/lix/issues/432 but then realised I could give fixing it a go myself. Change-Id: I062dbf1a80bbab192b5fd0b3a453a0b555ad16f2
2024-07-04distinguish between throws & errors during throwQyriad
Turns errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … while calling the 'throw' builtin at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar into errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … caused by explicit throw at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar Change-Id: I593688928ece20f97999d1bf03b2b46d9ac338cb
2024-07-04trace which part of `foo.bar.baz` errorsQyriad
Turns errors like: let somepkg.src = throw "invalid foobar"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta … while calling the 'throw' builtin at «string»:2:17: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta error: invalid foobar into errors like: let somepkg.src = throw "invalid foobar"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta … while evaluating 'somepkg.src' to select 'meta' on it at «string»:3:4: 2| somepkg.src = throw "invalid foobar"; 3| in somepkg.src.meta | ^ … while calling the 'throw' builtin at «string»:2:17: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta error: invalid foobar And for type errors, from: let somepkg.src = "I'm not an attrset"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = "I'm not an attrset"; | ^ 3| in somepkg.src.meta … while selecting an attribute at «string»:3:4: 2| somepkg.src = "I'm not an attrset"; 3| in somepkg.src.meta | ^ error: expected a set but found a string: "I'm not an attrset" into: let somepkg.src = "I'm not an attrset"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = "I'm not an attrset"; | ^ 3| in somepkg.src.meta … while selecting 'meta' on 'somepkg.src' at «string»:3:4: 2| somepkg.src = "I'm not an attrset"; 3| in somepkg.src.meta | ^ error: expected a set but found a string: "I'm not an attrset" For the low price of an enumerate() and a lambda you too can have the incorrect line of code actually show up in the trace! Change-Id: Ic1491c86e33c167891bdac9adad6224784760bd6
2024-07-04trace when the `foo` part of `foo.bar.baz` errorsQyriad
Turns errors like: let errpkg = throw "invalid foobar"; in errpkg.meta error: … while calling the 'throw' builtin at «string»:2:12: 1| let 2| errpkg = throw "invalid foobar"; | ^ 3| in errpkg.meta error: invalid foobar into errors like: let errpkg = throw "invalid foobar"; in errpkg.meta error: … while evaluating 'errpkg' to select 'meta' on it at «string»:3:4: 2| errpkg = throw "invalid foobar"; 3| in errpkg.meta | ^ … while calling the 'throw' builtin at «string»:2:12: 1| let 2| errpkg = throw "invalid foobar"; | ^ 3| in errpkg.meta error: invalid foobar For the low price of one try/catch, you too can have the incorrect line of code actually show up in the trace! Change-Id: If8d6200ec1567706669d405c34adcd7e2d2cd29d
2024-07-02Merge "Reject fully-qualified URLs in 'from' argument of `nix registry add`" ↵Delan Azabani
into main
2024-07-01Merge changes Ie29a8a89,I873eedcf into mainjade
* changes: store: delete obsolete lsof-disabling code store: guess the URL of failing fixed-output derivations
2024-06-30libexpr/flake: allow automatic rejection of configuration options from flakesAlois Wohlschlager
The `allow-flake-configuration` option allows the user to control whether to accept configuration options supplied by flakes. Unfortunately, setting this to false really meant "ask each time" (with an option to remember the choice for each specific option encountered). Let no mean no, and introduce (and default to) a separate value for the "ask each time" behaviour. Co-Authored-By: Jade Lovelace <lix@jade.fyi> Change-Id: I7ccd67a95bfc92cffc1ebdc972d243f5191cc1b4
2024-06-29Reject fully-qualified URLs in 'from' argument of `nix registry add`Delan Azabani
We previously allowed you to map any flake URL to any other flake URL, including shorthand flakerefs, indirect flake URLs like `flake:nixpkgs`, direct flake URLs like `github:NixOS/nixpkgs`, or local paths. But flake registry entries mapping from direct flake URLs often come from swapping the 'from' and 'to' arguments by accident, and even when created intentionally, they may not actually work correctly. This patch rejects those URLs (and fully-qualified flake: URLs), making it harder to swap the arguments by accident. Fixes #181. Change-Id: I24713643a534166c052719b8770a4edfcfdb8cf3
2024-06-27store: delete obsolete lsof-disabling codeJade Lovelace
Since Ifa0adda7984e, we don't use this code anymore on macOS, so we have no reason to have a knob to disable it anymore. Change-Id: Ie29a8a8978d9aefd4551895f4f9b3cc0827496df
2024-06-27store: guess the URL of failing fixed-output derivationsJade Lovelace
This is a shameless layering violation in favour of UX. It falls back trivially to "unknown", so it's purely a UX feature. Diagnostic sample: ``` error: hash mismatch in fixed-output derivation '/nix/store/sjfw324j4533lwnpmr5z4icpb85r63ai-x1.drv': likely URL: https://meow.puppy.forge/puppy.tar.gz specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= got: sha256-a1Qvp3FOOkWpL9kFHgugU1ok5UtRPSu+NwCZKbbaEro= ``` Change-Id: I873eedcf7984ab23f57a6754be00232b5cb5b02c
2024-06-26Merge "doc/hacking: fix up some outdated info about cross, hydra links" into ↵jade
main
2024-06-26Merge changes I476a2516,I8a274227 into mainjade
* changes: doc/hacking: fix internal api docs section to say to enable it doc: Add more about the release note generator
2024-06-25doc/hacking: fix up some outdated info about cross, hydra linksJade Lovelace
We would like to build these with Hydra but we do not currently have a Hydra to build them with conveniently. Change-Id: I0832a33881138dd1caab3805df7ad097db347e62
2024-06-25doc/hacking: fix internal api docs section to say to enable itJade Lovelace
I filed a bug to build these in releng in the future: https://git.lix.systems/lix-project/lix/issues/422 Change-Id: I476a2516cc2be382d4b7c8529a02f9212a78fdb2
2024-06-25doc: Add more about the release note generatorJade Lovelace
Change-Id: I8a274227cb1b05d442d3f644603dd2844ecc9d05
2024-06-25Merge "change shebangs of all .sh scripts to bash" into mainjade
2024-06-24Add some release notes for things we didJade Lovelace
Change-Id: If0ddec6b64a43c3d8f6cae39e0292863f3b49401
2024-06-24change shebangs of all .sh scripts to bashvigress8
On operating systems where /bin/sh is not Bash, some scripts are invalid because of bashisms, and building Lix fails with errors like this: `render-manpage.sh: 3: set: Illegal option -o pipefail` This modifies all scripts that use a `/bin/sh` shebang to `/usr/bin/env bash`, including currently POSIX-compliant ones, to prevent any future confusion. Change-Id: Ia074cc6db42d40fc59a63726f6194ea0149ea5e0
2024-06-24Add build-dir setting, clean up default TMPDIR handlingRobert Hensing
This is a squash of upstream PRs #10303, #10312 and #10883. fix: Treat empty TMPDIR as unset Fixes an instance of nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed. ... which I've been getting in one of my shells for some reason. I have yet to find out why TMPDIR was empty, but it's no reason for Nix to break. (cherry picked from commit c3fb2aa1f9d1fa756dac38d3588c836c5a5395dc) fix: Treat empty XDG_RUNTIME_DIR as unset See preceding commit. Not observed in the wild, but is sensible and consistent with TMPDIR behavior. (cherry picked from commit b9e7f5aa2df3f0e223f5c44b8089cbf9b81be691) local-derivation-goal.cc: Reuse defaultTempDir() (cherry picked from commit fd31945742710984de22805ee8d97fbd83c3f8eb) fix: remove usage of XDG_RUNTIME_DIR for TMP (cherry picked from commit 1363f51bcb24ab9948b7b5093490a009947f7453) tests/functional: Add count() (cherry picked from commit 6221770c9de4d28137206bdcd1a67eea12e1e499) Remove uncalled for message (cherry picked from commit b1fe388d33530f0157dcf9f461348b61eda13228) Add build-dir setting (cherry picked from commit 8b16cced18925aa612049d08d5e78eccbf0530e4) Change-Id: Ic7b75ff0b6a3b19e50a4ac8ff2d70f15c683c16a
2024-06-24Merge "Fix build instructions in hacking.md and justfile" into mainDelan Azabani
2024-06-24Fix build instructions in hacking.md and justfileDelan Azabani
The stdenv phases don’t actually do anything (at least not anymore), and our justfile doesn’t behave the same as our docs. This patch removes the stdenv phases from the docs, documents our usage of just, and makes `just setup` heed `$mesonFlags`. Fixes #413. Fixes #414. Change-Id: Ieb0b2a8ae420526238b5f9a73d7849ec6919995d
2024-06-22libmain: add progress bar with multiple status linesFinn Behrens
Add the log-formats `multiline` and `multiline-with-logs` which offer multiple current active building status lines. Change-Id: Idd8afe62f8591b5d8b70e258c5cefa09be4cab03
2024-06-17repl: implement tab completing :colon commandsQyriad
This uses a minor hack in which we check the rl_line_buffer global variable to workaround editline not including the colon in its completion callback. Fixes #361 Change-Id: Id159d209c537443ef5e37a975982e8e12ce1f486
2024-06-16build: correctly propagate changes to Lix source to manualQyriad
This adds the nix executable as an input argument to the custom targets that build the manual (HTML, and the man pages), so that changes to things like src/nix/nix.md cause the correct rebuilds Change-Id: Iffaa2c14acbfc721caef7b8cae9b53ecd365f26d
2024-06-15release: release notes for 2.90.0Jade Lovelace
For now we just need to put the release notes in the final spot. We will have to fix the date on both 2.90 and 2.91 branches, but such as it is. Release created with releng/create_release.xsh Closes: https://git.lix.systems/lix-project/lix/issues/318 Change-Id: I38e79b40e7f632c8a286f2f09865a84dc93eca90
2024-06-12doc: Write an index of environment variables used in testsuiteJade Lovelace
This was originally going to be just the testsuite but I kinda just documented all of them. I am tired of us not documenting these. This is a starting point to producing an actually good index. I would like to enforce it in a pre-commit hook eventually that we document all environment variables used in Lix itself, even if it is terse dev facing docs. This is full of a bunch of TODOs caused by auditing code. They should probably be done at some point. Change-Id: I7c0d3b257e19bae23d47d1efbd7361d203bccb0e
2024-06-12doc/testing.md: Rewrite some outdated sections for meson and current source ↵Jade Lovelace
layout Change-Id: Ia23f82c9a564b55bd799afbda59c28c9b0a65c13
2024-06-12doc: rewrite the multi-user documentation to actually talk about securityJade Lovelace
It's in the security section, and it was totally outdated anyway. I took the opportunity to write down the stuff we already believed. Change-Id: I73e62ae85a82dad13ef846e31f377c3efce13cb0
2024-06-09manual: rewrite the docker guide now that we have imagesJade Lovelace
Change-Id: I5bdf47e67059ae4099552750a47ae070dbe094df
2024-06-06Add meson release noteJade Lovelace
Change-Id: I4d2d08dc77a3ab4dce9fbb129c1487aa8c9f1722
2024-06-06Remove rl-next-devJade Lovelace
We realized that there's really no good place to put these dev facing bulletins, and the user-facing release notes aren't really the worst place to put them, I guess, and we do kind of hope that it converts users to devs. Change-Id: Id9387b2964fe291cb5a3f74ad6344157f19b540c
2024-06-01chore: rebrand Nix to Lix when it makes senseRaito Bezarius
Here's my guide so far: $ rg '((?!(recursive).*) Nix (?!(daemon|store|expression|Rocks!|Packages|language|derivation|archive|account|user|sandbox|flake).*))' -g '!doc/' --pcre2 All items from this query have been tackled. For the documentation side: that's for https://git.lix.systems/lix-project/lix/issues/162. Additionally, all remaining references to github.com/NixOS/nix which were not relevant were also replaced. Fixes: https://git.lix.systems/lix-project/lix/issues/148. Fixes: https://git.lix.systems/lix-project/lix/issues/162. Change-Id: Ib3451fae5cb8ab8cd9ac9e4e4551284ee6794545 Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-31Merge "document context-dependent keywords" into mainterru
2024-05-30Merge "release-notes: add missing credits/category to consistent-nix-build ↵Maximilian Bosch
entry" into main