1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
Commit graph

12171 commits

Author SHA1 Message Date
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
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
Luc Perkins
525078c59d
Fix broken link in configuration description 2025-06-11 08:52:04 -07: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
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
Kevin Robert Stravers
13e3704329
nix repl: Add :ll to show all recently loaded variables
Invoking `:ll` will start a pager with all variables which have just
been loaded by `:lf`, `:l`, or by a flake provided to `nix repl` as an
argument.

https://github.com/NixOS/nix/issues/11404
2025-06-05 17:33:04 -04:00
Kevin Robert Stravers
3c9b9b13af
nix repl: Print which variables are just loaded
When we run `nix repl nixpkgs` we get "Added 6 variables". This is not
useful as it doesn't tell us which variables the flake has exported to
our global repl scope.

This patch prints the name of each variable that was just loaded. We
currently cap printing to 20 variables in order to avoid excessive
prints.

https://github.com/NixOS/nix/issues/11404
2025-06-05 17:32:57 -04:00
Eelco Dolstra
4bce2d723d GitSourceAccessor: Make thread-safe 2025-06-04 21:39:15 +02:00
Jörg Thalheim
4b8f74b3a3
Merge pull request #13320 from DeterminateSystems/keep-failed-remote-builders-warning
Clarify that `--keep-failed` with remote builders will keep the failed build directory on that builder
2025-06-03 19:28:20 +02:00
Cole Helbling
54aa73b19b
fixup: only show "you can rerun" message if the derivation's platform is supported on this machine 2025-06-03 08:38:50 -07:00
Cole Helbling
0712339912
--keep-failed with remote builders will keep the failed build directory on that builder 2025-06-03 07:50:29 -07:00
Jörg Thalheim
6a761c1a60
Merge pull request #13296 from xokdvium/empty-accessor-prefix
Clear `displayPrefix` in `makeEmptySourceAccessor`
2025-06-03 01:32:46 +02:00
Jörg Thalheim
e72f19eb28
Merge pull request #13300 from NixOS/deletePath-keep-going
deletePath(): Keep going when encountering an undeletable file
2025-06-02 18:00:10 +02:00
Eelco Dolstra
6b6d3dcf34 deletePath(): Keep going when encountering an undeletable file
This should reduce the impact of #5207.
2025-06-02 14:54:01 +02:00
Eelco Dolstra
86767349d5
Merge pull request #13304 from fzakaria/small-fix
Fix overriding gtest with gmock
2025-06-02 14:02:47 +02:00
Eelco Dolstra
7ad4426b8b
Merge pull request #13310 from xokdvium/cleanup-position
libutil: Use `std::shared_ptr<const Pos>` and simplify `Pos` class constructors
2025-06-02 14:02:25 +02:00
Eelco Dolstra
97e3c3fff8
Merge pull request #13309 from NaN-git/fix-substring
libexpr: fix various overflows and type mismatches
2025-06-02 14:01:48 +02:00
Philipp Otterbein
afd9c78508 libexpr: fix various overflows and type mismatches 2025-06-02 02:06:48 +02:00
Sergei Zimmerman
9563b509ff
libexpr: Deduplicate Value::primOpAppPrimOp
`getPrimOp` function was basically identical to existing
`Value::primOpAppPrimOp` modulo some trivial differences.
Makes sense to reuse existing code for that.
2025-06-01 21:16:01 +00:00
Sergei Zimmerman
cdb8567473
libutil: Don't explicitly default special member functions
Since all of the member types are copyable/movable the compiler
will generate all of those by default anyway.
2025-06-01 20:55:28 +00:00
Sergei Zimmerman
b73e706589
libutil: Use std::shared_ptr<const Pos> instead of std::shared_ptr<Pos>
There's actually no mutation happening so there's no point in using
a mutable shared_ptr. Furthermore, this makes it much more evident to
the reader that no actual mutation (especially in multithreaded case)
is happening.

Also get rid of redundant constructor that isn't actually used anywhere
other than `Pos::operator std::shared_ptr<Pos>` which just passes in &*this,
(identical to just `this`), which can't be nullptr.
2025-06-01 20:55:26 +00:00
Philipp Otterbein
ed4e512dcd symbol-table: reference entries instead of allocating Values 2025-06-01 21:00:01 +02:00
Philipp Otterbein
94bbaddb93 symbol-table: reduce memory usage and use boost::unordered_flat_set 2025-06-01 19:20:11 +02:00
Farid Zakaria
58e34a2d27 Overriding gtest with gmock
How did this work before...

* Added .direnv/ to gitignore
2025-05-31 07:41:27 -07:00
Eelco Dolstra
908129eb22 Cleanup 2025-05-30 11:54:54 +02:00
Eelco Dolstra
4dc419eaec Split LinuxDerivationBuilder
This restores doing seccomp/personality initialization even when
sandboxing is disabled.

https://hydra.nixos.org/build/298482132
2025-05-29 21:57:25 +02:00
Eelco Dolstra
b7fd872147 Cleanup 2025-05-29 21:39:22 +02:00
Sergei Zimmerman
fba1bb0c13
Clear displayPrefix in makeEmptySourceAccessor
Judging by the comment for `makeEmptySourceAccessor` the prefix has
to be empty:

> Return a source accessor that contains only an empty root directory.

Fixes #13295.
2025-05-29 19:35:12 +00:00
John Ericson
20226c85bc
Merge pull request #13273 from NixOS/deprecate-structured-attrs-hack
Deprecate hacky way of making structured attrs
2025-05-28 13:40:23 -04:00
John Ericson
5e9744c331
Merge pull request #13287 from NixOS/fix-freebsd-build
Fix FreeBSD builds
2025-05-28 13:37:29 -04:00
John Ericson
7577d2d3ae Deprecate hacky way of making structured attrs
The method tested for in the previous commit is now deprecated.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-28 12:59:04 -04:00
John Ericson
24f5d7a9c3 Fix warning when HAVE_EMBEDDED_SANDBOX_SHELL is not set
Clang doesn't like the double indent that is needed for the `if...else`
that is CPP'd away. Adding braces is fine in the `if...else...` case,
and fine as a naked block in the CPP'd away case, and properly-indented
both ways.
2025-05-28 12:49:13 -04:00
John Ericson
8d725fdcb0 Fix FreeBSD builds 2025-05-28 12:47:33 -04:00
Seth Flynn
d0a2323829
lockFlake(): Allow registry lookups for overridden inputs
Fixes #13144
2025-05-28 00:24:41 -04:00
Eelco Dolstra
6686b54077 Fix mingw build
https://hydra.nixos.org/build/298331457
2025-05-28 00:48:10 +02:00
John Ericson
625dce659a Prepare for FreeBSD sandboxing support
This is the utility changes from #9968, which were easier to rebase
first.

I (@Ericson2314) didn't write this code; I just rebased it.

Co-Authored-By: Artemis Tosini <me@artem.ist>
Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
2025-05-27 14:54:50 -04:00
John Ericson
653a93ac0f
Merge pull request #13276 from NixOS/split-derivation-builder
Move platform-specific code out of `DerivationBuilder`
2025-05-27 13:39:02 -04:00
Eelco Dolstra
cf9d962086 Remove unused variable 2025-05-27 17:54:02 +02:00
Jörg Thalheim
f7c94cd908
Merge pull request #13278 from DeterminateSystems/gustavderdrache/system-builderror
Make platform checks throw BuildError like other failures
2025-05-27 16:39:55 +02:00