Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
(cherry picked from commit 5d8504b9789ffebabe8226227c4061dd48354177)
|
|
|
|
This avoids inheriting the caller's shellHook, which can happen when
running a dev-shell inside a dev-shell.
|
|
Tested against https://github.com/NixOS/nixpkgs/pull/72074.
Fixes #3540.
|
|
|
|
|
|
Fixes
$ nix copy .#hydraJobs.vendoredCrates --to /tmp/nix
error: path '/nix/store/...' is not valid
|
|
This means you now get an error message *before* stuff gets built:
$ nix copy .#hydraJobs.vendoredCrates
error: you must pass '--from' and/or '--to'
Try 'nix --help' for more information.
|
|
Fixes
$ nix copy
warning: Git tree '/home/eelco/Dev/nix-flake' is dirty
nix: src/nix/installables.cc:348: std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, nix::FlakeRef, nix::InstallableValue::DerivationInfo> nix::InstallableFlake::toDerivation(): Assertion `state->store->isValidPath(drvPath)' failed.
Aborted (core dumped)
|
|
|
|
|
|
In particular, doing 'nix build /path/to/dir' now works if
/path/to/dir is not a Git tree (it only has to contain a flake.nix
file).
Also, 'nix flake init' no longer requires a Git tree (but it will do a
'git add flake.nix' if it's a Git tree)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It uses the evaluation cache now rather than the ad hoc JSON cache.
|
|
|
|
|
|
In particular, we store whether an attribute failed to evaluate (threw
an exception) or was an unsupported type. This is to ensure that a
repeated 'nix flake show' never has to evaluate anything, so it can
execute without fetching the flake.
With this, 'nix flake show nixpkgs/nixos-20.03 --legacy' executes in
0.6s (was 3.4s).
|
|
|
|
This speeds up the creation of the cache for the nixpkgs flake from
21.2s to 10.2s. Oddly, it also speeds up querying the cache
(i.e. running 'nix flake show nixpkgs/nixos-20.03 --legacy') from 4.2s
to 3.4s.
(For comparison, running with --no-eval-cache takes 9.5s, so the
overhead of building the SQLite cache is only 0.7s.)
|
|
|
|
|
|
In the fully cached case for the 'nixpkgs' flake, it went from 101s to
4.6s. Populating the cache went from 132s to 17.4s (which could
probably be improved further by combining INSERTs).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(cherry picked from commit 8f41847394524fcac40d3b5620139ca7e94a18e3)
|
|
Usually this just writes to stdout, but for ProgressBar, we need to
clear the current line, write the line to stdout, and then redraw the
progress bar.
(cherry picked from commit 696c026006a6ac46adc990ed5cb0f31535bac076)
|
|
|
|
|
|
Usually this just writes to stdout, but for ProgressBar, we need to
clear the current line, write the line to stdout, and then redraw the
progress bar.
|
|
Previously the memory would occasionally be collected during eval since
the GC doesn't consider the member variable as alive / doesn't scan the
region of memory where the pointer lives.
By using the traceable_allocator<T> allocator provided by Boehm GC we
can ensure the memory isn't collected. It should be properly freed when
SourceExprCommand goes out of scope.
|
|
Future editions of flakes or the Nix language can be supported by
renaming flake.nix (e.g. flake-v2.nix). This avoids a bootstrap
problem where we don't know which grammar to use to parse
flake*.nix. It also allows a project to support multiple flake
editions, in theory.
|
|
|
|
|
|
|