Vladimír Čunát
77f6b6532f
tests: fixup with jq-1.8.0
2025-06-18 10:11:50 +02:00
Eelco Dolstra
bb32fcdf30
Merge pull request #13368 from wolfgangwalther/race-state-creation
...
libstore: fix race condition when creating state directories
2025-06-17 11:33:29 +02:00
Wolfgang Walther
d64c922164
libstore: fix race condition when creating state directories
...
Running parallel nix in nix can lead to multiple instances trying to
create the state directories and failing on the `createSymlink` step,
because the link already exists.
`replaceSymlink` is already idempotent, so let's use that.
Resolves #2706
2025-06-17 08:45:29 +02:00
John Ericson
cdb417854b
Merge pull request #13366 from drupol/push-smvorxlvxusx
...
docker: add basics OpenContainers labels
2025-06-16 18:11:53 -04:00
tomberek
af01fea5d6
Merge pull request #12623 from xokdvium/ord-safe-sort
...
Switch builtins.sort to a custom stable PeekSort
2025-06-16 05:11:23 -04:00
Pol Dellaiera
bb44347fac
docker: expose config.Cmd
as parameter
2025-06-16 08:16:39 +02:00
Pol Dellaiera
18dc96269d
docker: add basics OpenContainers labels
2025-06-16 08:16:39 +02:00
Sergei Zimmerman
f9170a84f6
tests/functional/lang: Add sort stability test for lists langer than 16 elements
...
libstdc++'s std::stable_sort and new builtins.sort implementation
special-case ranges with length less than or equal to 16 and delegate
to insertionsort.
Having a larger e2e test would allow catching sort stability issues
at functional level as well.
2025-06-15 16:52:08 +00:00
Sergei Zimmerman
ddcfc81ff1
libexpr: Document requirements for comparator passed to builtins.sort
2025-06-15 16:52:05 +00:00
Sergei Zimmerman
351d898c43
libexpr: Switch builtins.sort primop to use peeksort
...
This prevents C++ level undefined behavior from affecting
the evaluator. Stdlib implementation details should not affect
eval, regardless of the build platform. Even erroneous usage
of `builtins.sort` should not make it possible to crash the
evaluator or produce results that depend on the host platform.
2025-06-15 16:52:03 +00:00
Sergei Zimmerman
b2596a7615
libutil: Add custom PeekSort implementation
...
Unlike std::sort and std::stable_sort, this implementation
does not lead to out-of-bounds memory reads or other undefined
behavior when the predicate is not strict weak ordering.
This makes it possible to use this function in libexpr for
builtins.sort, where an incorrectly implemented comparator
in the user nix code currently can crash and burn the evaluator
by invoking C++ UB.
2025-06-15 16:52:01 +00:00
Jörg Thalheim
e73fcd008a
Merge pull request #13364 from drupol/push-qspryqrvmpkt
...
docker: remove last use of `pkgs.`
2025-06-15 06:09:52 +02:00
Pol Dellaiera
e27a062783
docker: remove last use of pkgs.
...
Follow-up of https://github.com/NixOS/nix/pull/13354
2025-06-14 10:38:20 +02:00
Jörg Thalheim
46853c467d
Merge pull request #13361 from jayeshv/patch-1
...
Fix a minor typo
2025-06-14 02:01:05 +02:00
jayeshv
699db04df3
Fix a minor typo
2025-06-13 12:28:27 +02:00
Jörg Thalheim
a1fe09d2c8
Merge pull request #13350 from xokdvium/meson-format
...
flake: Add meson formatter
2025-06-13 11:37:32 +02:00
Jörg Thalheim
84743c84c0
Merge pull request #13351 from drupol/push-rrzylpqynznw
...
docker: make sure `nix config check` works
2025-06-13 07:41:27 +02:00
Jörg Thalheim
82397e220d
Merge branch 'master' into push-rrzylpqynznw
2025-06-13 07:06:11 +02:00
Jörg Thalheim
918ac6b2fc
Merge pull request #13354 from drupol/push-sopslzmmlqxu
...
docker: use `callPackage`, parametrise the image build
2025-06-13 07:03:23 +02:00
Jörg Thalheim
d12e42489a
Merge pull request #13360 from xokdvium/duplicate-list-elems-overload
...
libexpr: Remove non-const overload of `listElems`
2025-06-13 07:03:03 +02:00
Sergei Zimmerman
7b46eb9958
libexpr: Remove non-const overload of listElems
...
This overload isn't actually necessary anywhere and
doesn't make much sense. The pointers to `Value`s are
themselves const, but the `Value`s are mutable.
A non-const member function implies that the object itself
can be modified but this doesn't make much sense considering
the return type: `Value * const * `, which is a pointer
to a constant array of pointers to mutable values.
2025-06-12 22:29:05 +00:00
Robert Hensing
c437e27abc
Merge pull request #13357 from xokdvium/more-getters
...
libexpr: Use more `Value` getters instead of reading `payload` directly (NFC)
2025-06-12 23:03:20 +02:00
Sergei Zimmerman
bc6b52aff0
libexpr: Add and use pathAccessor
getter
2025-06-12 20:01:38 +00:00
Sergei Zimmerman
e4df189123
libexpr: Add and use pathStr
getter
2025-06-12 19:57:46 +00:00
Sergei Zimmerman
c041d71406
libexpr: Add and use app
getter
2025-06-12 19:53:44 +00:00
Sergei Zimmerman
f07a9f863e
libexpr: Add and use primOpApp
getter
2025-06-12 19:51:44 +00:00
Sergei Zimmerman
441fa86e82
libexpr: Add and use thunk
getter
2025-06-12 19:48:42 +00:00
Sergei Zimmerman
6587e7bcff
libexpr: Add and use lambda
getter
2025-06-12 19:42:50 +00:00
Pol Dellaiera
6eb4ee6855
docker: replace git
with gitMinimal
2025-06-12 19:50:52 +02:00
Pol Dellaiera
5862f38d00
docker: use callPackage
, parametrise the image build
2025-06-12 19:50:31 +02:00
Pol Dellaiera
5abaf361a4
docker: reduce duplicates, use coreutils-full
2025-06-12 19:06:48 +02:00
Pol Dellaiera
57c72dee9b
docker: make sure nix config check
works
2025-06-12 11:01:17 +02:00
Sergei Zimmerman
93a42a5971
flake: Add meson formatter
...
This adds a meson.format file that mostly mirrors the projects
meson style and a pre-commit hook to enforce this style.
Some low-diff files are formatted.
2025-06-11 22:08:03 +00:00
John Ericson
371fcf91c3
Merge pull request #13294 from obsidiansystems/fix-13293
...
Fix #13293
2025-06-11 16:55:43 -04:00
John Ericson
5267718472
Fix #13293
...
We move the `assertPathValidity` to where we know what the wanted
outputs are.
2025-06-11 16:15:26 -04:00
John Ericson
f42eaf2c8e
Create test for #13293
...
It currently fails, before the fix.
2025-06-11 16:11:38 -04:00
John Ericson
d46ce52fac
Merge pull request #13347 from lucperkins/fix-broken-conf-link
...
Fix broken link in configuration description
2025-06-11 15:58:03 -04:00
John Ericson
35cb138a93
Merge pull request #13348 from NixOS/repl-test-robust-2
...
Make the repl test more robust
2025-06-11 15:57:38 -04:00
Eelco Dolstra
9eb46e9cc0
Make the repl test more robust
...
Seen in 4390954027
:
nix-functional-tests> grep: repl_output: No such file or directory
nix-functional-tests> +(repl.sh:174) cat repl_output
This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.
2025-06-11 20:53:28 +02:00
Luc Perkins
525078c59d
Fix broken link in configuration description
2025-06-11 08:52:04 -07:00
Robert Hensing
b3c1b70c19
Merge pull request #13345 from xokdvium/use-value-getters
...
libexpr: Use value getters (NFC)
2025-06-11 00:57:39 +02:00
Sergei Zimmerman
408873c2f7
libexpr: Use c_str
getter
2025-06-10 13:37:06 +00:00
Sergei Zimmerman
77f5f50ec2
libexpr: Use context
getter
2025-06-10 13:37:04 +00:00
Sergei Zimmerman
c2aaa68c2c
libexpr: Use primOp
getter
2025-06-10 13:37:01 +00:00
Robert Hensing
c5b1be46b4
Merge pull request #11406 from kstrafe/master
...
nix repl: Print which variables are just loaded
2025-06-07 13:53:13 +02:00
Robert Hensing
102259898c
Merge pull request #13258 from NaN-git/opt-symbol-table
...
Optimize symbol table
2025-06-07 13:16:14 +02:00
John Ericson
530efc3121
Merge pull request #13334 from NixOS/repl-incomplete-parse
...
repl: Don't wait on incomplete parses from imported file
2025-06-06 14:08:15 -04:00
Eelco Dolstra
91b3573770
Rethrow non-EOF errors
2025-06-06 17:09:01 +02:00
Eelco Dolstra
d8b067b549
repl: Don't wait on incomplete parses from imported file
...
Fixes #13332 .
2025-06-06 14:14:57 +02:00
Jörg Thalheim
37b4407c5c
Merge pull request #13284 from getchoo-contrib/getchoo/override-input-local-registry
...
lockFlake(): Allow registry lookups for overridden inputs
2025-06-06 10:11:27 +02:00