aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-24justfile: remove --quiet from `just test`Qyriad
`meson test` refuses to let `--verbose` (which shows the entire invocation and stdio) override `--quiet`, but if neither are specified in the justfile then you can use either `just test -q` or `just test -v` Change-Id: I449e13084ce64666b7ee2ab4280818782fb8185a
2024-05-24package.nix: add meta.mainProgramPierre Bourdon
nix-repl> lib.getExe (builtins.getFlake ".").packages.x86_64-linux.nix "/nix/store/ajps2zn5hlap0l2abvnfdaphg8k0789r-lix-2.90.0pre20240524_dirty/bin/nix" Fixes #316. Change-Id: Iec3125dc2dc99d100beb6357f7d1555456924ddc
2024-05-24[emergency revert]: make pname nix once moreJade Lovelace
Embarrassingly, I submitted a CL overriding submit requirements since I thought it was spurious failures. However, the CI failure was in fact real, and I have hopefully learned my lesson. The CI failure is that: ``` vm-test-run-nix-upgrade-nix> machine # installing 'nix-2.18.1' vm-test-run-nix-upgrade-nix> machine # building '/nix/store/2b6fdf7wvahd00bg2ff0393bhd597a0h-user-environment.drv'... vm-test-run-nix-upgrade-nix> machine # error: Unable to build profile. There is a conflict for the following files: vm-test-run-nix-upgrade-nix> machine # vm-test-run-nix-upgrade-nix> machine # /nix/store/dn6mhhr92bh3ad0n4pd1538ww88khjii-nix-2.18.1/lib/libboost_context.so vm-test-run-nix-upgrade-nix> machine # /nix/store/w4vffn9iq0znk8bcg5i2giij90xy6db6-lix-2.90.0pre20240523_c97e171/lib/libboost_context.so vm-test-run-nix-upgrade-nix> machine # error: builder for '/nix/store/2b6fdf7wvahd00bg2ff0393bhd597a0h-user-environment.drv' failed with exit code 1 vm-test-run-nix-upgrade-nix> machine # error: program '/nix/store/w4vffn9iq0znk8bcg5i2giij90xy6db6-lix-2.90.0pre20240523_c97e171/bin/nix-env' failed with exit code 100 ``` This is definitely caused by the pname not being the same, so we had better revert that part of the change until we know we won't regress anything by doing this. Fixes: https://gerrit.lix.systems/c/lix/+/1152/5 Change-Id: I0e9d573987f2819c106fb7cea87410fa75152274
2024-05-24Merge "nixos/tests: enable remoteBuilds tests against Nix 2.18" into mainPierre Bourdon
2024-05-23Merge changes I462a8cf0,I3b0bcea3,I2acd56e7,Ifc149764,I9e2ef170 into mainQyriad
* changes: docs: linkify nix3-build mention in nix-build.md build: make internal-api-docs PHONY cleanup lookupFileArg add docstring to lookupFileArg add libcmd test for lookupFileArg
2024-05-23Merge "packaging: rename nixexpr -> lixexpr and so on" into mainjade
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-23docs: linkify nix3-build mention in nix-build.mdQyriad
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-23build: make internal-api-docs PHONYQyriad
Since we're skipping Meson's dependency tracking, for the internal-api-docs custom target, we should just consider it a phony target and build it on every request. Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-23cleanup lookupFileArgQyriad
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-23add docstring to lookupFileArgQyriad
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-23add libcmd test for lookupFileArgQyriad
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-23nixos/tests: enable remoteBuilds tests against Nix 2.18Pierre Bourdon
Fixes #321. Change-Id: I60812aec9f9b68ab742413835c581d3b53432b9b
2024-05-23repl: log errors writing to history fileQyriad
These errors are now logged and explicitly ignored, rather than implicitly ignored. Change-Id: Ia26015466a17f2b11952df5317a4d150d79dc184
2024-05-23Merge "repl: do not crash when tab-completing import errors" into mainPierre Bourdon
2024-05-23Merge "doc: sort change-authors.yml" into maineldritch horrors
2024-05-23Merge "libstore: remove unused copyPath function" into maineldritch horrors
2024-05-23doc: sort change-authors.ymleldritch horrors
this should make it easier to spot future instances of entries being duplicated by accident. also add a pre-commit check to remain sorted Change-Id: I500caf862e93480b38c9d51144273bb2dcab1af0
2024-05-23repl: do not crash when tab-completing import errorsPierre Bourdon
File not found while importing causes a SysError, not an EvalError, which is not currently caught by the tab-completion handler. Ignoring all SysErrors might seem "dangerous" but this is the tab-completion handler, any exception being bubbled up from there causes unexpected behavior (causes the whole repl to exit). Fixes #340. Change-Id: I643048a47935e77f582decc539d9e51bdb96c890
2024-05-22fix: enlarge envSize by several times to not be close to nixpkgs sizeJade Lovelace
nixpkgs has 23000 attributes, and our previous limit would be hit if you have more than one nixpkgs in the environment, for example, because `repl-overlays` will load the new stuff from the environment on top of the existing environment. This is not really testable since if we did write such a test, it would just be testing this constant tbh... Fixes: https://git.lix.systems/lix-project/lix/issues/337 Change-Id: I49197bfb4db55b082f914f0d70e84f5f5f110954
2024-05-22Merge "libfetchers: fallback to memory SQLite if fs IO fails" into mainQyriad
2024-05-22release notes: add a bunch of themJade Lovelace
Also fix typos introduced by the commits I read. I have run the addDrvOutputDependencies release note past Ericson since I was confused by what the heck it was doing, and he was saying it was reasonable. Change-Id: Id015353b00938682f7faae7de43df7f991a5237e
2024-05-22Merge "doc: fix repl-interrupt release note entry" into mainalois31
2024-05-22libstore: remove unused copyPath functioneldritch horrors
Change-Id: Ibfb0848d8b337bd38947a745c240838865cea401
2024-05-21libfetchers: fallback to memory SQLite if fs IO failsQyriad
nix::fetchers::CacheImpl uses $XDG_CACHE_HOME, or its default based on $HOME, to store its SQLite database. If the current process can't write to that directory for whatever reason, though, any eval-time fetching would fail just initializing the cache. With this change, IO errors initializing the fetcher cache are logged but ignored, and nix::fetchers::CacheImpl falls back to an in-memory¹ database instead. Notably, this will fix any uses eval fetching while Lix itself is being run in a derivation builder (such as during tests), as the derivation builder does not set $XDG_CACHE_HOME, and sets $HOME to the non-existent directory /homeless-shelter. Before: $ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"' error: … while calling the 'fetchTarball' builtin at «string»:1:1: 1| fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" | ^ error: creating directory '/homeless-shelter': Permission denied After: $ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"' warning: ignoring error initializing Lix fetcher cache: error: creating directory '/homeless-shelter': Permission denied "/nix/store/s9lxdnn0awp37n560bg4fgr497ah4hvw-source" ¹: https://www.sqlite.org/inmemorydb.html Change-Id: I15c38c9baaf215fc6e192b8a4c70b9692a69bc22
2024-05-21doc: fix repl-interrupt release note entryAlois Wohlschlager
The timing of the merge resulted in the newly introduced metadata not being present. Change-Id: I07f28cf37703ec05c3e1b96301797a42d913264b
2024-05-21print type and value in "flake attr is not a derivation" errorsQyriad
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. Change-Id: I899757af418b6f98201006ec6ee13a448c07077c
2024-05-20Merge "libutil: Create chmodPath function" into mainArtemis Tosini
2024-05-20Merge "chore: remove incorrect maintainers/*.md documentation" into mainRaito Bezarius
2024-05-20git putFile: support flake maximalistsGraham Christensen
Passing the commit message as an argument causes update failures on repositories with lots of flake inputs. In some cases, the commit message is over 250,000 bytes. Upstream PR: https://github.com/NixOS/nix/pull/10686 (cherry picked from commit 8b5e8f4fba5728f2b3e90fcd1ab15df77e3ea0e8) Change-Id: I2c196a21cc9bedc24d57a828a0c5b9467e072f76
2024-05-20Merge "Remove upload-release.pl" into mainjade
2024-05-20Merge "fix -Wdeprecated-copy on clang (BaseError copy assignment)" into mainQyriad
2024-05-19repl-interacter: save history after entering every linePuck Meerburg
Fixes: https://git.lix.systems/lix-project/lix/issues/328 Change-Id: Iedd79ff5f72e84766ebd234c63856170afc624f0
2024-05-19change-authors: add puckPuck Meerburg
Change-Id: I04b8cd04a168b3adea7790f816e774d5d90fcea2
2024-05-19libutil: Create chmodPath functionArtemis Tosini
Move the identical static `chmod_` functions in libstore to libutil. the function is called `chmodPath` instead of `chmod` as otherwise it will shadow the standard library chmod in the nix namespace, which is somewhat confusing. Change-Id: I7b5ce379c6c602e3d3a1bbc49dbb70b1ae8f7bad
2024-05-19Remove upload-release.plJade Lovelace
We are doing releases totally differently than Nix so this will need rewriting anyway. Change-Id: Iba4ad160b9d215fcbf20a14243fd87cfbb527760
2024-05-19fix -Wdeprecated-copy on clang (BaseError copy assignment)Qyriad
2bbe3efd1¹ added the -Wdeprecated-copy warning, and fixed the instances of it which GCC warned about, in HintFmt and ref<T>. However, when building with Clang, there is an additional deprecated-copy warning in BaseError. This commit explicitly defaults the copy assignment operator for BaseError and silences this warning. 1: 2bbe3efd169534f538184ff788eecb398ead70a4 Change-Id: I50aa4a7ab1a7aae5d7b31f765994abd3db06379d
2024-05-19chore: remove incorrect maintainers/*.md documentationRaito Bezarius
Fate has something different in store for the release process, backporting process and the general maintainer documentation. See https://git.lix.systems/lix-project/lix/issues/260. Change-Id: I626686ff4059aee22a3ab1664b52581b2dbf6ed7 Signed-off-by: Raito Bezarius <raito@lix.systems>
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