aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-23packaging: rename nixexpr -> lixexpr and so onJade Lovelace
This breaks downstreams linking to us on purpose to make sure that if someone is linking to Lix they're doing it on purpose and crucially not mixing up Nix and Lix versions in compatibility code. We still need to fix the internal includes to follow the same schema so we can drop the single-level include system entirely. However, this requires a little more effort. This adds pkg-config for libfetchers and config.h. Migration path: expr.hh -> lix/libexpr/expr.hh nix/config.h -> lix/config.h To apply this migration automatically, remove all `<nix/>` from includes, so: `#include <nix/expr.hh>` -> `#include <expr.hh>`. Then, the correct paths will be resolved from the tangled mess, and the clang-tidy automated fix will work. Then run the following for out of tree projects: ``` lix_root=$HOME/lix (cd $lix_root/clang-tidy && nix develop -c 'meson setup build && ninja -C build') run-clang-tidy -checks='-*,lix-fixincludes' -load=$lix_root/clang-tidy/build/liblix-clang-tidy.so -p build/ -fix src ``` Related: https://git.lix.systems/lix-project/nix-eval-jobs/pulls/5 Fixes: https://git.lix.systems/lix-project/lix/issues/279 Change-Id: I7498e903afa6850a731ef8ce77a70da6b2b46966
2024-05-19libstore: fix old RemoteStore::addToStore serializereldritch horrors
having the serializer write into `*conn` is not legal because we are in a sinkToSource that will be drained by the remote we're connected to. writing into `*conn` directly can break the framing protocol. it is unlikely this code was ever run: to protocol it caters to is from 2016(!) and thoroughly untested in-tree, and since it's been present since nix 2.17 and the 1.18 protocol broken here is nix 2.0 we might safely assume that daemons older than nix 2.1 are no longer used now see also #325 (though that wants <2.3 gone, this is sadly only <2.1) Change-Id: I9d674c18f6d802f61c5d85dfd9608587b73e70a5
2024-05-18Improve nix-store --delete failure messageAlyssa Ross
On several occasions I've found myself confused when trying to delete a store path, because I am told it's still alive, but nix-store --query --roots doesn't show anything. Let's save future users this confusion by mentioning that a path might be alive due to having referrers, not just roots. (cherry picked from commit 979a019014569eee7d0071605f6ff500b544f6ac) Upstream-PR: https://github.com/NixOS/nix/pull/10733 Change-Id: I54ae839a85f3de3393493fba27fd40d7d3af0516
2024-05-18Merge "nix cat/dump-path/key: stop progress bar before writeFull" into mainPuck Meerburg
2024-05-18Merge "lix-doc: don't chomp bold headings off" into mainjade
2024-05-18nix cat/dump-path/key: stop progress bar before writeFullPuck Meerburg
These commands outputs data that may not end with a newline. This causes problems when the progress bar redraws, as that completely wipes the last line of output. As nix key generate-secret outputs a single line of text with no output, it shows up entirely blank, making it look like nothing happened. Fixes: https://git.lix.systems/lix-project/lix/issues/320 Change-Id: I5ac706d71d839b6dfa760b60a351414cd96297cf
2024-05-18Merge "derived-path: refuse built derived path with a non-derivation base" ↵Pierre Bourdon
into main
2024-05-18Deprecate the online flake registries and vendor the default registryjulia
Fixes #183, #110, #116. The default flake-registry option becomes 'vendored', and refers to a vendored flake-registry.json file in the install path. Vendored copy of the flake-registry is from github:NixOS/flake-registry at commit 9c69f7bd2363e71fe5cd7f608113290c7614dcdd. Change-Id: I752b81c85ebeaab4e582ac01c239d69d65580f37
2024-05-17package: add `--print-errorlogs` to meson's testsQyriad
This should have been in there originally, which is our mistake, considering that debugging CI failures is basically impossible without it. Change-Id: I4ab8799e6e0abca1984ed9801fe10c58200861a3
2024-05-17Merge "primops: change to std::function, allowing the passing of user data" ↵Puck Meerburg
into main
2024-05-17Merge "Loosen constness on listElems() result" into mainPuck Meerburg
2024-05-17Merge "make lix dev shells un-bear-able since we un-make them now" into mainjade
2024-05-17Merge "docs: mention importNative/exec in ↵Qyriad
allow-unsafe-native-code-during-evaluation" into main
2024-05-16make lix dev shells un-bear-able since we un-make them nowJade Lovelace
We don't need bear anymore, since we don't have any more bad build systems that lack compile commands generation inside Lix. Change-Id: I7809ddfd993180468f846e8cd862bdd54d5b31ec
2024-05-17Merge "Allow enabling core dumps from builds for nix & child processes" into ↵julia
main
2024-05-17docs: mention importNative/exec in allow-unsafe-native-code-during-evaluationQyriad
Both of these still needs their own actual documentation, but they are at least now mentioned that they exist and what they're enabled by. Change-Id: I235b9e8e627e04ed06611423c8e67a8eca233120
2024-05-17derived-path: refuse built derived path with a non-derivation basePierre Bourdon
Example: /nix/store/dr53sp25hyfsnzjpm8mh3r3y36vrw3ng-neovim-0.9.5^out This is nonsensical since selecting outputs can only be done for a buildable derivation, not for a realised store path. The build worker side of things ends up crashing with an assertion when trying to handle such malformed paths. Change-Id: Ia3587c71fe3da5bea45d4e506e1be4dd62291ddf
2024-05-16Allow enabling core dumps from builds for nix & child processesmidnightveil
Fixes https://git.lix.systems/lix-project/lix/issues/268 Change-Id: I3f1b0ddf064f891cca8b53229c5c31c74cea3d9f
2024-05-17Merge "add clarifying doc-comments on {get,create}NixStateDir()" into mainQyriad
2024-05-16Merge "builtins: fix builtins.langVersion docs to state it's deprecated" ↵jade
into main
2024-05-16primops: change to std::function, allowing the passing of user dataYorick van Pelt
(cherry picked from commit 48aa57549d514432d6621c1e29f051951eca2d7f) Change-Id: Ib7d5c6514031ceb6c42ac44588be6b0c1c3c225b
2024-05-16Loosen constness on listElems() resultPuck Meerburg
Change-Id: I1caff000362c83e5172413a036c22a2e9ed3ede8
2024-05-15builtins: fix builtins.langVersion docs to state it's deprecatedJade Lovelace
This builtin was always a problem and nixpkgs uses it in exactly one place, to give up if the Nix version is absurdly old. It has no other use cases, and doesn't work in a multi-implementation world anyway. Change-Id: I03c36e118591029e2ef14b091fe14a311c66a08a
2024-05-15build: fix build when gc is disabledMel Zuser
Change-Id: I8d3eb8874a4138668011b525c3b400a55a1f4866
2024-05-15lix-doc: don't chomp bold headings offFireFly
There are a few places in nixpkgs lib where `**Foo**:` is used as a heading instead of the usual markdown `# Foo` ones. I think this is intentional with how it gets rendered in the manual, e.g. [`lib.lists.sortOn`][1]. [1]: https://nixos.org/manual/nixpkgs/stable/#function-library-lib.lists.sortOn `nix-doc` prints this as ``` *Laws**: ```nix sortOn f == sort (p: q: f p < f q) ``` ``` chomping off the first asterisk as part of `cleanup_single_line` that's meant to deal with `/** \n * \n * \n */` style doc comments. This also means the usage in lix ends up funny-looking with a trailing asterisk as if there's a footnote to pay attention to (which is how I first noticed it, heh) The fix: When cleaning up a single line and removing a prefix comment character, ensure it's followed by whitespace (or the last character of the line). Upstream-PR: https://github.com/lf-/nix-doc/pull/26 Change-Id: If2870c53a632f6bbbcca98a4bfbd72f5bef37879
2024-05-15release-notes: build unreleased release notes by defaultJade Lovelace
Surely if you have unreleased changes you want them on a page right? `officialRelease` means "this is a *release version*", which is a reasonable case to not want it, but we are not that here. I understand wanting to be able to turn it off for deps reasons or something, but other than that, uhh, seems better to just turn it on always; it is basically free compute-wise to the point we run it on pre-commit. Part two of fixing lix#297. Fixes: https://git.lix.systems/lix-project/lix/issues/297 Change-Id: I0f8dd1ae42458df371aef529c456e47a7ac04ae0
2024-05-15build-release-notes: add change author metadata and use itJade Lovelace
Change-Id: I6f5fb54f70b02a467bbdee4c526f59da1193f7db
2024-05-15build-release-notes: add change author info DBJade Lovelace
This allows us to have links to peoples' GitHub and Forgejo profiles. I used YAML because I don't want to introduce a dependency on having a working Nix evaluator to be able to build release notes, and we already have a YAML parser in this script. Change-Id: Idf2813f79e0407460c796cba6c383496465e152d
2024-05-15doc: add release note credits and categories for all the changes in LixJade Lovelace
This does not add missing release notes, and it doesn't do anything about the profiles feature we would really like to have so we can have consistent credit. Change-Id: I72a6f7acfcff85f380be17dac76501a6f4693776
2024-05-15build-release-notes: support categoriesJade Lovelace
Change-Id: Icdcbd2cf5bf075e7006ce1f8bc0c9d6c35cfd072
2024-05-15build-release-notes: fail if the directory does not existJade Lovelace
This was a combination of two problems: the python didn't throw an error because apparently glob on a nonexistent directory doesn't crash, and secondarily, bash ignores bad exit codes without `set -e` if they are not in the final/only command. Change-Id: I812bde7a4daee5c77ffe9d7c73a25fd14969f548
2024-05-15doc: fix rl-next buildAlois Wohlschlager
Use the correct directory for the rl-next build, so that the release notes actually get built and the page doesn't end up empty. I don't know why the exception didn't cause a build failure before. Fixes: https://git.lix.systems/lix-project/lix/issues/297 Change-Id: Ic72b9bb4c0d2d1f633f2af90cce4a3a2796d7f9b
2024-05-15Merge "feat: add `credits` field to release note generator" into mainjade
2024-05-15Merge "nix3-build: show all FOD errors with `--keep-going`" into mainMaximilian Bosch
2024-05-15Merge changes I8456c47b,I48253f5f into mainalois31
* changes: repl: clear the interrupt before reading the next line libutil: remove the interrupt-blocking code
2024-05-15nix3-build: show all FOD errors with `--keep-going`Maximilian Bosch
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
2024-05-14feat: add `credits` field to release note generatorRaito Bezarius
Now, we can credit folks for their work. The credit generator is very basic, we probably want a database of profiles and link to their preferred page or something. Change-Id: Ida81905750371e5e125d0ce7e554d0526265cf8e Co-Authored-By: Jade Lovelace <lix@jade.fyi> Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-15Merge "doc: add a script to upload the nightly manual manually" into mainjade
2024-05-14doc: add a script to upload the nightly manual manuallyJade Lovelace
This is not like, perfect, since it is a manual operation, but we can automate it in the future. rclone is used, since it seems like awscli is not (obviously at least?) able to sync directories such that old things are deleted, and rclone does this thing properly. Fixes: https://git.lix.systems/lix-project/meta/issues/2 Change-Id: Ia6a46d861342a6d29b22f981ba4e35e79f79e60e
2024-05-13repl: clear the interrupt before reading the next lineAlois Wohlschlager
Otherwise, it will be thrown again during exit when the repl is terminated by end-of-input after the last command was interrupted. Change-Id: I8456c47bc36cfb0892efdad5420f318f7e6526d5
2024-05-13libutil: remove the interrupt-blocking codeAlois Wohlschlager
The interrupt-blocking code was originally introduced 20 years ago so that trying to log an error message does not result in an interrupt exception being thrown and then going unhandled (c8d3882cdc8f9e22c58af285c1996265c1af75d5). However, the logging code does not check for interrupts any more (054be5025762c5e1c7e853c4fa5d7eed8da1727f), so this reasoning is no longer applicable. Delete this code so that later interrupts are unblocked again, for example in the next line entered into the repl. Closes: https://git.lix.systems/lix-project/lix/issues/296 Change-Id: I48253f5f4272e75001148c13046e709ef5427fbd
2024-05-12tests: don't build test plugin shared libs on static buildsPierre Bourdon
This changes the way plugins.sh is excluded to remove the need for BUILD_SHARED_LIBS along the way. Change-Id: I19fe55b4a37c49a11fffa61c8a3be7e8d1a51b4d
2024-05-12Merge "libstore: Fix sandbox=relaxed" into mainArtemis Tosini
2024-05-11add clarifying doc-comments on {get,create}NixStateDir()Qyriad
NixStateDir() != NIX_STATE_DIR. These functions should honestly probably be renamed. Change-Id: I00f54b742bba6188bbc7f2410956d956780b99d3
2024-05-11filetransfer: unit test content-encoding handlingPierre Bourdon
Very basic behavior test to ensure that gzip data gets internally decompressed by the file transfer pipeline. Change a std::string_view return value in the test harness to std::string. I wouldn't call myself a C++ beginner and I still managed to shoot myself in the foot like three times with the lifetime managements there (e.g. [&] { return an_std_string; } ends up with a dangling string_view!). Change-Id: I1360750d4181ce1ca2a3aa4dc0e97e131351c469
2024-05-11filetransfer: fix decompression regression from 121edecfPierre Bourdon
121edecf654ec084274ba1a779c7140082f4115d added a new state field to carry over content encoding settings from transfer to sink creation, but never actually set that field. Change-Id: I714b2efe745561e851b78a4791479b3501db8c72
2024-05-10Merge "bump the extra --version info from info to notice, -vv -> -v" into mainQyriad
2024-05-10Merge "feat(libstore): print the first line of stdout of SSH in case of ↵Raito Bezarius
failure" into main
2024-05-10feat(libstore): print the first line of stdout of SSH in case of failureRaito Bezarius
In case of failure to connect as can be seen in https://buildbot.lix.systems/#/builders/39/builds/1386/steps/1/logs/stdio It is difficult to understand what happened, if we enabled the talkative verbose level, we could learn about the first line SSH sent us. In practice, this is not workable, we can just make it warn all the time. Change-Id: Iaaf56894060a58f2dfc78254bb60b1c43482f9bb Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-10bump the extra --version info from info to notice, -vv -> -vQyriad
requiring *two* --verbose to print extra information on --version is a weird flex Change-Id: I05d043da1bf583f34e9d1fc206144ea4ca9a859d