Age | Commit message (Collapse) | Author |
|
|
|
|
|
Make `nix search` highlight all regexes and matches
|
|
The signature was also changed so the function now accepts a vector
instead of an iterator
|
|
Make `nix why-depends` quieter by default
|
|
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
|
|
This has been unused since 170e86dff5724264e0d3d25b9af1bd42df6aec74
CC @thufschmitt
|
|
|
|
|
|
Unless `--precise` is passed, make `nix why-depends` only show the
dependencies between the store paths, without introspecting them to
find the actual references.
This also makes it ~3x faster
|
|
Print build logs when not connected to a TTY
|
|
|
|
This is needed to get the path of a derivation that might not exist
(e.g. for 'nix store copy-log').
InstallableStorePath::toDerivedPaths() cannot be used for this because
it calls readDerivation(), so it fails if the store doesn't have the
derivation.
|
|
Fixes #5222.
|
|
|
|
Remove shared strings
|
|
These were needed back in the pre-C++11 era because we didn't have
move semantics. But now we do.
|
|
flakes: search up to git or filesystem boundary
|
|
|
|
improve parser performance a bit
|
|
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
|
|
When stderr is not connected to a tty, show "building" and
"substituting" messages, a-la nix-build et al.
Closes https://github.com/NixOS/nix/issues/4402
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
|
|
|
|
`nix why-depends` is piping its output into a pager by default.
However the pager was only started after the first path is printed,
causing it to be excluded from the pager output.
(Actually the pager was started *inside* the recursive function that was
printing the dependency chain, so a new instance was started at each
level. It’s a little miracle that it worked at all).
Fix #5911
|
|
when given a string yacc will copy the entire input to a newly allocated
location so that it can add a second terminating NUL byte. since the
parser is a very internal thing to EvalState we can ensure that having
two terminating NUL bytes is always possible without copying, and have
the parser itself merely check that the expected NULs are present.
# before
Benchmark 1: nix search --offline nixpkgs hello
Time (mean ± σ): 572.4 ms ± 2.3 ms [User: 563.4 ms, System: 8.6 ms]
Range (min … max): 566.9 ms … 579.1 ms 50 runs
Benchmark 2: nix eval -f ../nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix
Time (mean ± σ): 381.7 ms ± 1.0 ms [User: 348.3 ms, System: 33.1 ms]
Range (min … max): 380.2 ms … 387.7 ms 50 runs
Benchmark 3: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
Time (mean ± σ): 2.936 s ± 0.005 s [User: 2.715 s, System: 0.221 s]
Range (min … max): 2.923 s … 2.946 s 50 runs
# after
Benchmark 1: nix search --offline nixpkgs hello
Time (mean ± σ): 571.7 ms ± 2.4 ms [User: 563.3 ms, System: 8.0 ms]
Range (min … max): 566.7 ms … 579.7 ms 50 runs
Benchmark 2: nix eval -f ../nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix
Time (mean ± σ): 376.6 ms ± 1.0 ms [User: 345.8 ms, System: 30.5 ms]
Range (min … max): 374.5 ms … 379.1 ms 50 runs
Benchmark 3: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
Time (mean ± σ): 2.922 s ± 0.006 s [User: 2.707 s, System: 0.215 s]
Range (min … max): 2.906 s … 2.934 s 50 runs
|
|
Previously you had to remember to call value->attrs->sort() after
populating value->attrs. Now there is a BindingsBuilder helper that
wraps Bindings and ensures that sort() is called before you can use
it.
|
|
|
|
Only sort once, after adding all of the attrs first. This reduces my
`nix repl '<nixpkgs>'` loading time from 1.07s to 103ms.
Fixes #5823
|
|
Remove CPU locking
|
|
Don't insert spaces when completing attribute paths
|
|
|
|
This was already accidentally disabled in ba87b08. It also no longer
appears to be beneficial, and in fact slow things down, e.g. when
evaluating a NixOS system configuration:
elapsed time: median = 3.8170 mean = 3.8202 stddev = 0.0195 min = 3.7894 max = 3.8600 [rejected, p=0.00000, Δ=0.36929±0.02513]
|
|
Fixes #5806
|
|
Changed `If not command` to `If no command`, also specified that the
default shell launched in `nix shell` can be specified with `$SHELL`.
|
|
|
|
|
|
When a variable is assigned in the REPL, make sure to remove any possible reference to the old one so that we correctly pick the new one afterwards
Fix #5706
|
|
Add a :log command that shows logs for a derivation.
Closes https://github.com/NixOS/nix/issues/3504
Co-authored-by: Taeer Bar-Yam <taeer@bar-yam.me>
|
|
|
|
|
|
Closes https://github.com/NixOS/nix/issues/5656
|
|
|
|
|
|
Closes https://github.com/NixOS/nix/issues/5487
Co-authored-by: Alexander Bantyev balsoft@balsoft.ru
|
|
This prevents Nix from barfing when run in a container where it
doesn't have the appropriate privileges.
|
|
toJSON: report error position for fancier output
|
|
nix key: Fix error message and don't require flakes
|
|
This is part of the flakes feature. Mark it as such.
|
|
|