Shea Levy
92edc38369
Don't send plugin-files to the daemon.
...
This is radically unsafe and the daemon has already loaded its plugins
anyway.
Fixes cachix/devenv#276
2023-02-01 20:05:56 -05:00
Eelco Dolstra
119ba50eb8
Merge pull request #7733 from edolstra/clang-c++20
...
Fix C++20 compilation with clang
2023-02-01 21:15:34 +01:00
Eelco Dolstra
e8ca49f6ef
Fix clang compilation
2023-02-01 20:34:44 +01:00
Eelco Dolstra
57a4258426
Remove an unused capture
2023-02-01 20:27:35 +01:00
Eelco Dolstra
7a09bfbcb6
Merge pull request #7723 from yorickvP/nix-store-ping-json
...
nix store ping: add --json flag
2023-02-01 17:11:34 +01:00
Théophane Hufschmitt
518da6c6a3
Merge pull request #7716 from obsidiansystems/small-storePath-cleanups
...
Separate `path.hh` from `content-address.hh`
2023-02-01 16:00:28 +01:00
Eelco Dolstra
b55a946d8d
Merge pull request #7717 from obsidiansystems/delete-dead-code
...
Delete dead code
2023-02-01 15:57:04 +01:00
Eelco Dolstra
ed9d7c83db
Merge pull request #7718 from obsidiansystems/fix-rapidcheck-autoconf
...
Fix configure.ac rapidcheck tests
2023-02-01 15:56:35 +01:00
Théophane Hufschmitt
e32c5c2c77
Merge pull request #7667 from dramforever/flake-search-attr
...
Better error message for nix search when attr is not found
2023-02-01 15:56:22 +01:00
Eelco Dolstra
6f0436a337
Merge pull request #7719 from andersk/manual-timestamp
...
manual: Document that the store timestamp is now 1, not 0
2023-02-01 15:50:36 +01:00
Eelco Dolstra
845b7f067d
Merge pull request #7726 from hercules-ci/flake-show-when-empty-hide
...
nix flake show: Ignore empty attrsets
2023-02-01 15:49:13 +01:00
Eelco Dolstra
14b0b9ea5a
Merge pull request #7203 from graham33/feature/cpp20
...
Proposal: Use C++20
2023-02-01 15:41:04 +01:00
Robert Hensing
60d48eda23
nix flake show: Ignore empty attrsets
...
For frameworks it's important that structures are as lazy as possible
to prevent infinite recursions, performance issues and errors that
aren't related to the thing to evaluate. As a consequence, they have
to emit more attributes than strictly (sic) necessary.
However, these attributes with empty values are not useful to the user
so we omit them.
2023-01-31 18:20:26 +01:00
Yorick van Pelt
4757b3f04e
tests/store-ping: test nix store ping --json
2023-01-31 15:10:54 +01:00
Yorick van Pelt
4f4a6074e4
nix store ping: try to print json if connect() fails aswell
2023-01-31 15:10:39 +01:00
Théophane Hufschmitt
0079d29437
Merge pull request #7714 from ncfavier/doc-structuredAttrs
...
doc: add `__structuredAttrs`, `outputChecks`, `unsafeDiscardReferences`
2023-01-31 14:43:58 +01:00
Yorick van Pelt
28648ed784
nix store ping: add --json flag
2023-01-31 13:24:23 +01:00
Anders Kaseorg
c5d4c50aba
manual: Document that the store timestamp is now 1, not 0
...
Commit 14bc3ce3d6
(0.13~43) changed the
timestamps in the Nix store from 0 to 1. Update the nix-store man
page to match.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-01-30 23:51:35 -08:00
Robert Hensing
c9b9260f34
Merge pull request #7713 from obsidiansystems/more-rapid-check
...
Add more property tests
2023-01-30 18:54:53 +01:00
John Ericson
16fa8c2e0e
Fix configure.ac rapidcheck tests
...
- `AC_LANG_PUSH(C++)` is needed for the header check
- The library check is hopeless (without lots of third-party macros I
don't feel like getting) because name mangling
Pkg-config would make all this easier. I previously opened
https://github.com/emil-e/rapidcheck/issues/302 , I should write a PR
too.
2023-01-30 12:08:57 -05:00
John Ericson
e21aa43212
Delete dead code
...
The references set seems to have been unused since `LegacySSHStore`
references were first created in
caa5793b4a
.
The method decls never were upstream, and accidentally added by me in
062533f7cd
(probably due to `git rerere`).
Sorry!
This reduces the diff from #3746 .
2023-01-30 11:29:01 -05:00
dramforever
6b779e4b07
Fix extra "." in CmdSearch::getDefaultFlakeAttrPaths
...
No other getDefaultFlakeAttrPaths implementation has this trailing dot,
and the dot can show up in error messages like:
error: flake '...' does not provide attribute 'packages.x86_64-linux.', ...
2023-01-31 00:04:05 +08:00
dramforever
377d5eb388
Installable::getCursors: Cleanup
...
- Clarify doc comments, Installables::getCursors returns non-empty
vector
- Use vector::at in Installable::getCursor instead of checking for empty
vector and throwing an exception with error message.
2023-01-31 00:04:05 +08:00
dramforever
b26562c629
InstallableFlake: Handle missing attr in getCursors
...
Handle the case where none of getActualAttrPaths() actually exists,
in which case instead of returning an empty vector.
This fixes the case where the user misspells the attribute name in nix
search. Instead of getting no search results, now it shows an error with
suggestions.
Also remove InstallableFlake::getCursor() override since it's now
equivalent to the base class version.
2023-01-30 23:59:09 +08:00
John Ericson
560142fec0
Make per-variant Arbitrary impls too
...
This is a nice idea that @roberth requested. If we could factor our a
generic `std::variant` impl as a follow-up it would be even better!
2023-01-30 10:56:00 -05:00
John Ericson
02e745ba5b
Separate path.hh
from content-address.hh
...
It is good to separate concerns; `StorePath` (in general) has nothing to
do with `ContentAddress` anyways.
This reduces the diff from #3746 .
2023-01-30 10:14:03 -05:00
Robert Hensing
a31d7d4e5e
Merge pull request #7715 from obsidiansystems/small-storePath-cleanups
...
Avoid some `StorePath` <-> `Path` round trips
2023-01-30 16:12:19 +01:00
John Ericson
f3e272ba02
Avoid some StorePath
<-> Path
round trips
...
Avoid needless work and throwing away invariants.
These conversions date back to when `StorePath` was in Rust and there
were issues with it missing utility methods.
2023-01-30 09:37:57 -05:00
Naïm Favier
0b3464a107
doc: add __structuredAttrs
, outputChecks
, unsafeDiscardReferences
2023-01-30 14:49:45 +01:00
Eelco Dolstra
c79b1582a7
Merge pull request #5226 from NixOS/client-side-profiles
...
Move the default profiles to the user’s home
2023-01-30 12:21:47 +01:00
Théophane Hufschmitt
575d0aea5d
Merge pull request #6988 from max-privatevoid/pr-flake-show-foreign
...
nix flake show: don't evaluate derivations for foreign systems by default
2023-01-30 12:06:37 +01:00
Théophane Hufschmitt
3ac9f1658a
Fix the flakes init test
...
Things leading to another...
2023-01-30 11:21:52 +01:00
Théophane Hufschmitt
de1b593233
Merge pull request #7087 from ncfavier/referenceablePaths
...
Self-contained outputs
2023-01-30 11:06:54 +01:00
Théophane Hufschmitt
bc6e65e26f
Fix the flakes/show test
...
Don't hardcode “x86_64-linux” as this won't work too nicely on other
platforms
2023-01-30 10:44:10 +01:00
Théophane Hufschmitt
7cd08ae379
Merge pull request #7645 from typetetris/fix-url-parsing-file-as-application-scheme
...
Fix url parsing for urls using `file+`
2023-01-30 10:42:03 +01:00
Théophane Hufschmitt
7408776b00
Fix the release-notes
...
Slightly butchered during the merge
2023-01-30 10:32:23 +01:00
Théophane Hufschmitt
4aaf0ee52e
Merge branch 'master' into referenceablePaths
2023-01-30 10:31:00 +01:00
Théophane Hufschmitt
d70b890488
Merge pull request #7689 from ncfavier/nix-path-restrict-eval
...
getDefaultNixPath: actually respect `{restrict,pure}-eval`
2023-01-30 10:03:17 +01:00
John Ericson
ecd3e4ebd7
More property tests
...
Also put proper comparison methods on `DerivedPath` and
`NixStringContextElem`, which is needed for the tests but good in
general.
2023-01-29 17:09:59 -05:00
John Ericson
ec0c0efec6
Allow unit test infra to be reused across libs' tests
...
This allows using Arbitrary "instances" defined in libstore-tests in
libexpr-tests, something we will leverage in a moment.
2023-01-29 13:52:57 -05:00
John Ericson
6772e9ed0a
Allow programs to have custom names
...
Logic modeled after that for libraries.
2023-01-29 13:52:57 -05:00
Max
02e81cdf62
apply showAllSystems to legacyPackages as well
2023-01-27 23:59:48 +01:00
Naïm Favier
dba9173a1d
Document default nix-path
value
2023-01-27 15:25:07 +01:00
Théophane Hufschmitt
ccaadc9575
Merge pull request #7648 from hercules-ci/move-nixos-tests
...
Move nixos tests
2023-01-27 15:11:48 +01:00
Naïm Favier
1cba5984a6
getDefaultNixPath: actually respect {restrict,pure}-eval
...
Previously, getDefaultNixPath was called too early: at initialisation
time, before CLI and config have been processed, when `restrictEval` and
`pureEval` both have their default value `false`. Call it when
initialising the EvalState instead, and use `setDefault`.
2023-01-27 13:28:57 +01:00
Théophane Hufschmitt
79c084cb59
Add a test for nix flake show
2023-01-27 10:15:49 +01:00
Théophane Hufschmitt
ab424a39a9
Merge remote-tracking branch 'nixos/master' into pr-flake-show-foreign
2023-01-27 09:46:46 +01:00
Théophane Hufschmitt
ed479aafdc
Merge pull request #7461 from rapenne-s/improve_messaging_untrusted_sub_user
...
Improve warning when an untrusted user is using an untrusted substituter
2023-01-26 11:01:37 +01:00
Solène Rapenne
6b2729c81e
improve documentation about substituters and trusted users
...
Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-01-26 09:56:44 +01:00
Solène Rapenne
64951d9125
Update src/libstore/daemon.cc
...
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-26 09:34:25 +01:00