Eelco Dolstra
46d9e70c20
Add trust-tarballs-from-git-forges setting
...
If enabled, GitHub flakerefs don't require a content hash, a Git
revision is enough.
Fixes #10297 .
2024-03-29 13:38:47 +01:00
Théophane Hufschmitt
90f5189451
Merge pull request #10131 from intelfx/work/notty
...
`TERM=dumb` fixes
2024-03-29 13:38:37 +01:00
José Luis Lafuente
2bb609bce2
C API: rename nix_observe_string -> nix_get_string_callback
2024-03-29 10:01:16 +01:00
Théophane Hufschmitt
de101417eb
Merge pull request #10305 from hercules-ci/addErrorContext-is-great
...
Always print addErrorContext
2024-03-29 09:10:09 +01:00
Robert Hensing
ef26133df3
Merge pull request #10337 from Cyclic4179/patch-1
...
`nix shell` shebang: support O'Caml comments
2024-03-28 19:54:03 +01:00
José Luis Lafuente
061140fc8f
C API: remove unused argument
2024-03-28 19:38:12 +01:00
José Luis Lafuente
925a8fda6e
C API: Use new ListBuilder helper
...
See https://github.com/NixOS/nix/pull/10251
2024-03-28 19:02:01 +01:00
José Luis Lafuente
c57de60522
C API: Keep the structure flat
...
See https://github.com/NixOS/nix/pull/10329
2024-03-28 19:00:04 +01:00
José Luis Lafuente
d96b52bd8b
C api: nix_export_std_string -> nix_observe_string
2024-03-28 10:52:02 +01:00
José Luis Lafuente
31fbb24329
C API: refactor nix_store_realise
2024-03-28 10:52:02 +01:00
José Luis Lafuente
1a574c6c60
C API: refactor ListBuilder
2024-03-28 10:52:01 +01:00
José Luis Lafuente
34d15e8f2f
C API: rename nix_store_build -> nix_store_realise
2024-03-28 10:52:01 +01:00
José Luis Lafuente
1093ab64a2
C API: add more tests
2024-03-28 10:52:01 +01:00
José Luis Lafuente
c49b88b066
C API: update docs based on PR feedback
2024-03-28 10:52:01 +01:00
José Luis Lafuente
7c602d9f01
C API: add tests for external values
2024-03-28 10:52:01 +01:00
José Luis Lafuente
2349185c96
C API: fix after rebase
2024-03-28 10:52:00 +01:00
José Luis Lafuente
6c231dcf68
C API: disable test
2024-03-28 10:52:00 +01:00
José Luis Lafuente
24c8f6864d
C API: if store doesn't have a version, return an empty string
2024-03-28 10:52:00 +01:00
José Luis Lafuente
dfdb90dc8e
C API: Consolidate initializers
2024-03-28 10:52:00 +01:00
José Luis Lafuente
415583a500
C API: use bool argument consistently
2024-03-28 10:52:00 +01:00
José Luis Lafuente
d5ec1d0617
C API: nix_store_open, check for empty strings
2024-03-28 10:51:59 +01:00
José Luis Lafuente
535694122e
C API: rename State to EvalState
2024-03-28 10:51:59 +01:00
José Luis Lafuente
24604d024a
C API: fix docs build after rebase
2024-03-28 10:51:59 +01:00
José Luis Lafuente
41f1669dea
C API: add tests for libutil and libstore
2024-03-28 10:50:02 +01:00
José Luis Lafuente
46f5d0ee7b
Apply suggestions from code review
2024-03-28 10:47:56 +01:00
José Luis Lafuente
550af113c6
String value refactor
...
Related to https://github.com/NixOS/nix/pull/9047
2024-03-28 10:47:56 +01:00
Yorick van Pelt
c6e28d8da2
C API: fix: macos doesn't have std::bind_front
2024-03-28 10:47:56 +01:00
Yorick van Pelt
ab9250286a
C API: add a way to throw errors from primops
2024-03-28 10:47:56 +01:00
Yorick van Pelt
3d79f38709
C API: add user_data argument to nix_alloc_primop
...
Also add a helper function for primops, that converts to C argument
types
(and eventually handles errors)
2024-03-28 10:47:55 +01:00
Yorick van Pelt
48aa57549d
primops: change to std::function, allowing the passing of user data
2024-03-28 10:47:55 +01:00
Yorick van Pelt
9e423dee11
C API: update after rebase
2024-03-28 10:47:55 +01:00
Yorick van Pelt
e1bb799da9
C API: reformat according to proposed clang-format file
2024-03-28 10:47:55 +01:00
Yorick van Pelt
9d380c0f76
C API: clarify some documentation
2024-03-28 10:47:55 +01:00
Yorick van Pelt
5d82d6e733
nix_api: fix missing includes in headers
...
Forward declaration doesn't work here, since we define classes that
contain the objects
2024-03-28 10:47:55 +01:00
Yorick
40f5d48d3c
Apply documentation suggestions from code review
...
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-03-28 10:47:55 +01:00
Yorick van Pelt
e642bbc2a7
C API: move to src/lib*/c/
2024-03-28 10:46:39 +01:00
Yorick van Pelt
df9401eb4e
nix_api_store: add nix_init_plugins
2024-03-28 10:39:07 +01:00
Yorick van Pelt
dc0f7d8f96
initPlugins: run nix_plugin_entry() on dlopen'd plugins
...
Only when it exists.
2024-03-28 10:39:07 +01:00
Yorick van Pelt
713f10aeaa
nix_api_value: Add nix_register_primop to add builtins
2024-03-28 10:39:07 +01:00
Yorick van Pelt
e891aac2e4
nix_api_value: add nix_get_attr_name_byidx get attr names without forcing
2024-03-28 10:39:07 +01:00
Yorick van Pelt
9cccb8bae0
nix_api_expr: always force values before giving them to the user
2024-03-28 10:39:07 +01:00
Yorick van Pelt
f0afe7f9b9
nix_api_util: throw nix::error instead of new nix::Error for null ctx's
2024-03-28 10:39:06 +01:00
Yorick van Pelt
e74d6c1b3d
nix_api_expr: document nix_value_force
2024-03-28 10:39:06 +01:00
Yorick van Pelt
e58a9384c6
nix_api_expr, nix_api_util: slightly improve documentation
2024-03-28 10:39:06 +01:00
Yorick van Pelt
f41a7e326b
nix_err_code: do not fail
2024-03-28 10:39:06 +01:00
Yorick van Pelt
b0741f7128
external-api-doc: introduce and improve documentation
2024-03-28 10:39:06 +01:00
Yorick van Pelt
866558af34
nix_api_expr: add error handling to incref, decref
2024-03-28 10:39:06 +01:00
Yorick van Pelt
ada2af4f88
nix_api_expr: add nix_gc_now()
2024-03-28 10:39:06 +01:00
Yorick van Pelt
ded0ef6f6c
nix_api_expr: switch to refcounting
...
Remove GCRef, keep references in a map. Change to nix_gc_incref and
nix_gc_decref, where users will mostly use nix_gc_decref.
2024-03-28 10:39:05 +01:00
Yorick van Pelt
bebee700ea
nix_api_external: own return strings on the nix side
...
Change from nix_returned_string that passes ownership, into a
nix_string_return parameter that can be set using nix_set_string_return.
2024-03-28 10:39:05 +01:00
Yorick van Pelt
022b918db1
nix_api_expr: remove bindingsbuilder refcounting
2024-03-28 10:39:05 +01:00
Yorick van Pelt
aa85f7d917
nix_api_expr: merge nix_parse_expr and nix_expr_eval, remove Expr
2024-03-28 10:39:05 +01:00
Yorick van Pelt
1777e4a5bb
nix_api_store: add userdata param to nix_store_build
2024-03-28 10:39:05 +01:00
Yorick van Pelt
1e583c4ebd
nix_api_value: nix_{get,set}_double -> nix_{get,set}_float
2024-03-28 10:39:05 +01:00
Yorick van Pelt
efcddcdd2f
nix_api_external: fix missing void* self param
2024-03-28 10:39:05 +01:00
Yorick van Pelt
c3b5b8eb62
nix_api_expr, store: fix minor documentation issues
2024-03-28 10:39:05 +01:00
Yorick van Pelt
4a4936136b
nix_api_value: fix documentation for get_attr_byname
2024-03-28 10:39:04 +01:00
Puck Meerburg
748b322ddd
nix_api_value: fix primop arity
2024-03-28 10:39:04 +01:00
Yorick van Pelt
e76652a5d3
libexpr: add C bindings
2024-03-28 10:39:04 +01:00
Yorick van Pelt
1d41600498
libstore: add C bindings
2024-03-28 10:39:04 +01:00
Yorick van Pelt
4702317506
libutil: add C bindings
2024-03-28 10:39:04 +01:00
Yang, Bo
c39afb28db
Clarify stringLength is counting bytes
2024-03-27 16:46:50 -07:00
Eelco Dolstra
c0dd111af1
Fix flake evaluation in chroot stores
...
This is a temporary fix until we can pass `SourcePath`s rather than
`StorePath`s to `call-flake.nix`.
Fixes #10331 .
2024-03-27 20:49:56 +01:00
John Ericson
77205b2042
Allow for ergnomically putting Unix-only files in subdirs by creating INLCUDE_$(pkg)
vars
...
Separate platform-specific files will allow avoiding a lot of CPP.
2024-03-27 12:01:59 -04:00
annalee
7205a6bbc9
enable persistent WAL mode for sqlite db
...
allow processes without write access to the directory containing the db
to read the db when all connections are closed. Without this setting and
with WAL enabled and no open db connections unprivileged processes will
fail to open the db due the WAL files not existing and not able to
create them. When the WAL files are persistent unprivileged processeses
can read the db when there are no open connections.
Additionally, journal_size_limit is set to 2^40, which results in the
WAL files being truncated to 0 on exit, as well as limiting the WAL
files to 2^40 bytes following a checkpoint.
https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
https://www.sqlite.org/pragma.html#pragma_journal_size_limit
ed517a7082/src/wal.c (L2518)
Fixes https://github.com/NixOS/nix/issues/10300
2024-03-27 15:36:09 +00:00
Robert Hensing
d4fa0a84a5
refact: TraceKind -> TracePrint
...
Co-authored-by: Rebecca Turner <rbt@sent.as>
2024-03-27 16:32:49 +01:00
Robert Hensing
bed541b04e
error.cc: Make printTrace static
2024-03-27 16:28:04 +01:00
Robert Hensing
981c309057
Remove trace item: while calling the 'addErrorContext' builtin
2024-03-27 16:28:04 +01:00
Robert Hensing
bebacc475c
Always print addErrorContext traces
2024-03-27 16:28:04 +01:00
Cyclic4179
a2c3333b97
fix #10336
2024-03-27 07:47:36 +01:00
Théophane Hufschmitt
6c10cc0eda
Merge pull request #10312 from hercules-ci/add-build-dir
...
Add build-dir setting
2024-03-26 13:51:50 +01:00
Théophane Hufschmitt
0bf01917ef
Merge pull request #10325 from K900/ooformatting
...
build-remote: fix format string shenanigans
2024-03-26 11:45:32 +01:00
Théophane Hufschmitt
1394d4e9c5
Merge pull request #10306 from hercules-ci/baseNameOf
...
Test and document `builtins.baseNameOf`, improve internal `baseNameOf()`
2024-03-26 09:59:27 +01:00
K900
2d4edb945b
build-remote: fix format string shenanigans
...
HintFmt(string) invokes the HintFmt("%s", literal) constructor,
which is not what we want here. Add a constructor with a proper name
and call that.
Next step: rename all the other ones to HintFmt::literal(string).
Fixes https://github.com/NixOS/nix/issues/10238
2024-03-26 11:01:03 +03:00
Robert Hensing
8b16cced18
Add build-dir setting
2024-03-25 19:48:59 +01:00
Robert Hensing
b1fe388d33
Remove uncalled for message
2024-03-25 19:48:57 +01:00
Eelco Dolstra
c82623a6cc
Remove value clearing since it no longer has an effect
2024-03-25 19:21:25 +01:00
Eelco Dolstra
8c0590fa32
Never update values after setting the type
...
Thunks are now overwritten by a helper function
`Value::finishValue(newType, payload)` (where `payload` is the
original anonymous union inside `Value`). This helps to ensure we
never update a value elsewhere, since that would be incompatible with
parallel evaluation (i.e. after a value has transitioned from being a
thunk to being a non-thunk, it should be immutable).
There were two places where this happened: `Value::mkString()` and
`ExprAttrs::eval()`.
This PR also adds a bunch of accessor functions for value contents,
like `Value::integer()` to access the integer field in the union.
2024-03-25 19:21:25 +01:00
Eelco Dolstra
6d90287f5a
Merge pull request #10303 from hercules-ci/fix-empty-TMPDIR
...
fix: Treat empty TMPDIR as unset
2024-03-25 12:49:10 +01:00
Robert Hensing
9884018dfa
baseNameOf(): Remove all trailing slashes
2024-03-24 01:38:22 +01:00
Robert Hensing
754a15e2db
builtins.baseNameOf: Fork
2024-03-24 01:37:58 +01:00
Robert Hensing
175afc7106
Test and document builtins.baseNameOf
2024-03-24 01:26:17 +01:00
Robert Hensing
3b7f2bf997
git/dumpTree: Assert name not empty before back()
2024-03-24 00:58:08 +01:00
Robert Hensing
850c9a6caf
HttpBinaryCacheStore: Remove *all* trailing slashes
2024-03-24 00:52:14 +01:00
Robert Hensing
dd26f41379
local-derivation-goal.cc: Remove *all* trailing slashes
2024-03-24 00:52:14 +01:00
Robert Hensing
fd31945742
local-derivation-goal.cc: Reuse defaultTempDir()
2024-03-24 00:45:15 +01:00
Robert Hensing
b9e7f5aa2d
fix: Treat empty XDG_RUNTIME_DIR as unset
...
See preceding commit. Not observed in the wild, but is sensible
and consistent with TMPDIR behavior.
2024-03-24 00:42:31 +01:00
Robert Hensing
c3fb2aa1f9
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.
2024-03-24 00:42:31 +01:00
detroyejr
717391731c
flakes: remove experimental repl-flake
2024-03-22 19:30:03 -04:00
Eelco Dolstra
bfd36402ac
EvalCache: Fix missing format string argument
...
Fixes
terminate called after throwing an instance of 'boost::wrapexcept<boost::io::too_few_args>'
what(): boost::too_few_args: format-string referred to more arguments than were passed
Aborted (core dumped)
for type errors in AttrCursor.
2024-03-22 18:11:24 +01:00
Robert Hensing
a223280664
Merge pull request #10286 from hercules-ci/various
...
Allocate a bit less
2024-03-22 11:19:58 +01:00
Théophane Hufschmitt
f666eda94d
Merge pull request #10274 from tweag/warn-on-untrusted-setting
...
Daemon: warn when an untrusted user cannot override a setting
2024-03-21 16:40:24 +01:00
Théophane Hufschmitt
039b3fbdfe
Merge pull request #10271 from jonringer/document-flake-multiple-outputs
...
Document how to build many outputs of a flake package
2024-03-21 15:58:32 +01:00
Robert Hensing
1fcdd1640e
functionArgs: Allocate bools only once
2024-03-20 23:25:28 +01:00
Robert Hensing
8c6e0df45f
value.hh: Fix warning about {struct/class} Value
2024-03-20 23:25:28 +01:00
Robert Hensing
a865049c4f
tryEval: Allocate true and false once
2024-03-20 23:25:28 +01:00
Robert Hensing
d71e74838a
readDir: Allocate type strings only once
2024-03-20 23:25:28 +01:00
Jonathan Ringer
4c8a33ce46
Update src/nix/build.md
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-03-20 14:42:44 -07:00
Robert Hensing
7d2ead50e5
Merge pull request #10083 from lf-/jade/refactor-repl-input
...
refactor: move the repl input code to its own file
2024-03-20 22:37:40 +01:00
Robert Hensing
d16d7f5f31
Merge pull request #10251 from edolstra/list-builder
...
Add a ListBuilder helper for constructing list values
2024-03-20 22:30:38 +01:00
Robert Hensing
d4b0b7f152
createBaseEnv: Use state.vNull
2024-03-20 21:34:23 +01:00
Robert Hensing
0b08dd45b0
prim_match: Use state.vNull
2024-03-20 21:28:38 +01:00
Félix Baylac-Jacqué
40a7929c8e
Daemon: warn when an untrusted user cannot override a setting
...
In a daemon-based Nix setup, some options cannot be overridden by a
client unless the client's user is considered trusted.
Currently, if an untrusted user tries to override one of those
options, we are silently ignoring it.
This can be pretty confusing in certain situations.
e.g. a user thinks he disabled the sandbox when in reality he did not.
We are now sending a warning message letting know the user some options
have been ignored.
Related to #1761 .
This is a cherry-pick of 9e0f5f803f
.
The above commit has been reverted by
a59e77d9e5
to prevent spamming warnings
with experimental features, but these are now totally ignored on the
daemon side, so there's no reason for the revert any more.
2024-03-20 17:55:35 +01:00
Théophane Hufschmitt
346f92aa4c
Merge pull request #10241 from bouk/resolve-ref-packed-refs
...
git fetcher: use resolveRef for getting revision of reference
2024-03-20 17:37:15 +01:00
Jonathan Ringer
a5262fb880
Document how to build many outputs of a flake package
2024-03-19 17:37:04 -07:00
John Ericson
18945e3f44
Merge branch 'master' into overlayfs-store
2024-03-18 16:43:33 -04:00
John Ericson
cd35e00103
Adding missing tracking URL for local overlay store
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-03-18 16:41:16 -04:00
lelgenio
ad217ddbbc
Document builtins.storePath being disabled by pure-eval
2024-03-18 16:23:17 -03:00
Yueh-Shun Li
d2b512959c
builtins.addDrvOutputDependencies: fix commentary
2024-03-18 02:38:31 +08:00
Yueh-Shun Li
39b0b8452f
doc: builtins.addDrvOutputDependencies: fix link target
2024-03-17 06:13:14 +08:00
Eelco Dolstra
3e6730ee62
Mark Value pointers in Value::elems as const
...
This catches modification of finalized values (e.g. in prim_sort).
2024-03-15 18:26:37 +01:00
Eelco Dolstra
fecff520d7
Add a ListBuilder helper for constructing list values
...
Previously, `state.mkList()` would set the type of the value to tList
and allocate the list vector, but it would not initialize the values
in the list. This has two problems:
* If an exception occurs, the list is left in an undefined state.
* More importantly, for multithreaded evaluation, if a value
transitions from thunk to non-thunk, it should be final (i.e. other
threads should be able to access the value safely).
To address this, there now is a `ListBuilder` class (analogous to
`BindingsBuilder`) to build the list vector prior to the call to
`Value::mkList()`. Typical usage:
auto list = state.buildList(size);
for (auto & v : list)
v = ... set value ...;
vRes.mkList(list);
2024-03-15 18:26:37 +01:00
Dimitar Nestorov
a50295425e
docs: update registry examples
...
When you run `nix flake info` you get a deprecated message
2024-03-14 16:15:52 +02:00
Bouke van der Bijl
60c2d15f5a
git fetcher: use resolveRef for getting revision of reference
...
* Add regression test
* Fix 'no repo' test so it doesn't succeed if the data is still in cache
* Use git_revparse_single inside git-utils instead of reimplementing the same logic.
2024-03-14 14:04:51 +01:00
Emanuel Czirai
e5840d5760
typo consant->constant in context.cc
2024-03-13 20:35:24 +01:00
Jade Lovelace
ea31b8a117
refactor: repl prompts are now the job of the interacter
2024-03-12 18:25:35 -07:00
Jade Lovelace
70a6ce139b
refactor: move readline stuff into its own file
...
This is in direct preparation for an automation mode of nix repl.
2024-03-12 18:25:35 -07:00
Jade Lovelace
76aced6915
finally.hh: delete copy constructor which is a bad idea
2024-03-12 18:25:35 -07:00
Eelco Dolstra
bff5c94184
Merge pull request #10205 from 9999years/final-matchers
...
Make `Matcher` subclasses `final`
2024-03-12 07:23:15 +01:00
Eelco Dolstra
18b89ca58c
Merge pull request #10227 from tmplt/doc/nix-copy
...
nix-copy: document --all --from local binary cache example
2024-03-12 07:22:28 +01:00
Théophane Hufschmitt
18b2ef8b20
Merge pull request #10209 from 9999years/rethrow-for-top-level-errors-in-repl
...
Print top-level errors normally in `nix repl`
2024-03-11 21:11:28 +01:00
Viktor Sonesten
db36c9ca90
nix-copy: document --all --from local binary cache example
2024-03-11 19:17:45 +01:00
tomberek
25bf671015
Merge pull request #10200 from 9999years/fix-nix-eval-for-derivations
...
Fix `nix eval nixpkgs#bash` segfault
2024-03-11 13:56:49 -04:00
Robert Hensing
3539172fd2
Merge pull request #10208 from 9999years/print-strings-directly
...
`:print` strings directly in `nix repl`
2024-03-11 10:02:09 +01:00
Rebecca Turner
db9bab2708
Matcher
: Add virtual destructor
2024-03-10 12:56:07 -07:00
Eelco Dolstra
841fd78baa
GitArchiveInputScheme: Support the narHash attribute
...
This is required to produce a locked flakeref.
2024-03-10 14:08:55 +01:00
Rebecca Turner
d13c63afa2
Print top-level errors normally in nix repl
...
Previously, errors while printing values in `nix repl` would be printed
in `«error: ...»` brackets rather than displayed normally:
```
nix-repl> legacyPackages.aarch64-darwin.pythonPackages.APScheduler
«error: Package ‘python-2.7.18.7’ in /nix/store/6s0m1qc31zw3l3kq0q4wd5cp3lqpkq0q-source/pkgs/development/interpreters/python/cpython/2.7/default.nix:335 is marked as insecure, refusing to evaluate.»
```
Now, errors will be displayed normally if they're emitted at the
top-level of an expression:
```
nix-repl> legacyPackages.aarch64-darwin.pythonPackages.APScheduler
error:
… in the condition of the assert statement
at /nix/store/6s0m1qc31zw3l3kq0q4wd5cp3lqpkq0q-source/lib/customisation.nix:268:17:
267| in commonAttrs // {
268| drvPath = assert condition; drv.drvPath;
| ^
269| outPath = assert condition; drv.outPath;
… in the left operand of the OR (||) operator
at /nix/store/6s0m1qc31zw3l3kq0q4wd5cp3lqpkq0q-source/pkgs/development/interpreters/python/passthrufun.nix:28:45:
27| if lib.isDerivation value then
28| lib.extendDerivation (valid value || throw "${name} should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.") {} value
| ^
29| else
(stack trace truncated; use '--show-trace' to show the full trace)
error: Package ‘python-2.7.18.7’ in /nix/store/6s0m1qc31zw3l3kq0q4wd5cp3lqpkq0q-source/pkgs/development/interpreters/python/cpython/2.7/default.nix:335 is marked as insecure, refusing to evaluate.
```
Errors emitted in nested structures (like e.g. when printing `nixpkgs`)
will still be printed in brackets.
2024-03-09 18:28:04 -08:00
Rebecca Turner
d859d6c434
:print
strings directly in nix repl
...
Strings are now printed directly when evaluated by `:print`, rather than
escaped. This makes it easier to debug multi-line strings or strings
containing quotes, like the results of `builtins.readFile`,
`lib.toShellArg`, and so on.
```
nix-repl> "cuppy\ndog\ncity"
"cuppy\ndog\ncity"
nix-repl> :p "cuppy\ndog\ncity"
cuppy
dog
city
```
2024-03-09 18:13:08 -08:00
Rebecca Turner
70e93c1e2b
Make Matcher
subclasses final
...
Fixes this very long warning, which I'll only include the first line of:
/nix/store/8wrjhrycpshhc3b41xmjwvgqr2m3yajq-libcxx-16.0.6-dev/include/c++/v1/__memory/construct_at.h:66:5: warning: destructor called on non-final 'RegexMatcher' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
__loc->~_Tp();
2024-03-09 17:07:52 -08:00
Valentin Gagarin
ac730622e8
document where the value of builtins.nixPath
comes from ( #9113 )
...
* document default values for `nix-path`
also note how it's overridden and note the effect of `restrict-eval`
2024-03-09 17:57:57 +00:00
Rebecca Turner
4910d74086
Print derivation paths in nix eval
...
`nix eval` forces values and prints derivations as attribute sets, so
commands that print derivations (e.g. `nix eval nixpkgs#bash`) will
infinitely loop and segfault.
Printing derivations as `.drv` paths makes `nix eval` complete as
expected. Further work is needed, but this is better than a segfault.
2024-03-08 21:43:54 -08:00
tomberek
a200ee6bf7
Merge pull request #9874 from pennae/error-reports
...
improve error reports somewhat
2024-03-08 10:51:14 -05:00
Eelco Dolstra
ae2bd460a8
Merge pull request #10166 from bobvanderlinden/profile-regex-all
...
profile: introduce --regex and --all
2024-03-08 15:59:24 +01:00
Eelco Dolstra
6d245182e8
GitHub fetcher: Don't emit treeHash yet
...
But do accept it if it's there, so we don't choke on future lock files
that do have the treeHash attribute.
2024-03-08 12:40:14 +01:00
Bob van der Linden
3d628d1704
profile: convert Matcher to abstract class
2024-03-08 10:47:51 +01:00
Bob van der Linden
91f068c193
profile: make --all exclusive
2024-03-07 21:07:03 +01:00
Bob van der Linden
7a4d5e89d3
profile: add --all option to match any package
2024-03-07 21:07:03 +01:00
Bob van der Linden
87741dbd21
profile: add --regex option to match packages
2024-03-07 21:07:03 +01:00
Bob van der Linden
d6f5da51d3
profile: match on package name instead of regex
2024-03-07 21:07:03 +01:00
Bob van der Linden
741a6bfad5
profile: allow different types of matchers
2024-03-07 21:07:03 +01:00
Rebecca Turner
4b4c71e239
Restore "checking Hydra job" message in nix flake check
...
Mistakenly removed in #8893 , thanks @lf- for catching this!
9404ce36e4 (r139485316)
2024-03-07 08:15:53 -08:00
Théophane Hufschmitt
a3163b9eab
Fix the outputs moving on macOS
2024-03-07 14:52:40 +01:00
Eelco Dolstra
0282499e18
PathInputScheme::getFingerprint(): Don't barf on relative paths
...
This wasn't caught by CI because #10149 and #10152 pass
individually... It doesn't happen on lazy-trees either because we
never try to fetch relative path flakes (#10089 ).
2024-03-07 13:28:52 +01:00
Eelco Dolstra
da62528487
Merge pull request from GHSA-2ffj-w4mj-pg37
...
Copy built outputs
2024-03-07 11:56:24 +01:00
Eelco Dolstra
7d76bc8a39
Merge pull request #10152 from edolstra/fetcher-cleanups
...
Fetcher cleanups
2024-03-07 10:21:11 +01:00
Eelco Dolstra
bd828b1937
Merge pull request #10150 from edolstra/always-upgrade-unlocked-flakerefs
...
nix profile upgrade: Always upgrade unlocked flakerefs
2024-03-07 10:20:37 +01:00
Eelco Dolstra
38b79da100
Merge pull request #10149 from edolstra/use-flake-fingerprint
...
LockedFlake::getFingerprint(): Use Input::getFingerprint()
2024-03-07 10:18:19 +01:00
Robert Hensing
73cf23275e
Merge pull request #10107 from tweag/repl-file-argument
...
Properly fail on flakerefs that don't point to a directory
2024-03-07 10:04:35 +01:00
tomberek
0a11080c58
Merge pull request #10172 from lf-/jade/fix-9725
...
fix: bounds check result in getMaxCPU
2024-03-07 00:58:44 -05:00
Jade Lovelace
9c64a09c70
fix: bounds check result in getMaxCPU
...
Fixes https://github.com/NixOS/nix/issues/9725
2024-03-06 20:57:31 -08:00