Age | Commit message (Collapse) | Author |
|
Alternative to #4639. You can still read flake.lock, but at least in
reproducible workflows like NixOS configurations where you require a
non-dirty tree, evaluation will fail because there is no rev.
|
|
|
|
This fixes a use-after-free bug:
1. s = new EvalState();
2. callFlake()
3. static vCallFlake now references s
4. delete s;
5. s2 = new EvalState();
6. callFlake()
7. static vCallFlake still references s
8. crash
Nix 2.3 did not have a problem with recreating EvalState.
|
|
|
|
|
|
This is a bit more informative than just the hash.
Also, format the diffs a bit nicer.
|
|
flake-registry should be safe to set to an aribtrary value, since it
is identical to just setting `inputs`.
|
|
Some people want to avoid using registries at all on their system; Instead
of having to add --no-registries to every command, this commit allows to
set use-registries = false in the config. --no-registries is still allowed
everywhere it was allowed previously, but is now deprecated.
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
|
|
Before this commit, nixConfig.flake-registry didn't have any real effect
on the evaluation, since config was applied after inputs were evaluated.
Change this behavior: apply the config in the beginning of flake::lockFile.
|
|
When overriding an input that isn’t a flake, mark the override as also not
being a flake.
Fix #3774
|
|
This makes sure that $HOME/.local/share/nix exists before we try to
write to it.
|
|
Fixes #4671.
|
|
Example:
$ nix build --show-trace
error: unable to download 'https://api.github.com/repos/NixOS/nixpkgs/commits/no-such-branch': HTTP error 422 ('')
response body:
{
"message": "No commit found for SHA: no-such-branch",
"documentation_url": "https://docs.github.com/rest/reference/repos#get-a-commit"
}
… while fetching the input 'github:NixOS/nixpkgs/no-such-branch'
… while updating the flake input 'nixpkgs'
… while updating the lock file of flake 'git+file:///home/eelco/Dev/nix'
|
|
|
|
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
|
|
I believe that this makes it possible to do things like
Git inputs with submodules, but it also likely applies
to other input types from libfetchers.
|
|
|
|
And Value::type to Value::internalType, such that type() can be used in
the next commit to get the new ValueType
|
|
|
|
|
|
This will be useful to abstract over the ValueType implementation
details
Make use of it already to replace the showType(ValueType) function
|
|
|
|
|
|
|
|
Fixes #4241.
|
|
Allow nix.conf options to be set in flake.nix
|
|
|
|
This makes it possible to have per-project configuration in flake.nix,
e.g. binary caches and other stuff:
nixConfig.bash-prompt-suffix = "[1;35mngi# [0m";
nixConfig.substituters = [ "https://cache.ngi0.nixos.org/" ];
|
|
|
|
|
|
Add some internal documentation for flake support objects.
|
|
|
|
|
|
Issue #4050.
|
|
|
|
|
|
|
|
|
|
|
|
The registry targets generally follow a URL formatting schema with
support for a query parameter of "?dir=subpath" to specify a sub-path
location below the URL root.
Alternatively, an absolute path can be specified. This specification
mode accepts the query parameter but ignores/drops it. It would
probably be better to either (a) disallow the query parameter for the
path form, or (b) recognize the query parameter and add to the path.
This patch implements (b) for consistency, and to make it easier for
tooling that might switch between a remote git reference and a local
path reference.
See also issue #4050.
|
|
std::optional had redundant checks for whether it had a value.
An object is emplaced either way so it can be dereferenced
without repeating a value check
|
|
|
|
fixed typo
|
|
|
|
This reduces compilation time by ~15 seconds (CPU time).
Issue #4045.
|
|
Directly register the store classes rather than a function to build an
instance of them.
This gives the possibility to introspect static members of the class or
choose different ways of instantiating them.
|
|
If a repo is dirty, it used to return a `rev` object with an "empty"
sha1 (0000000000000000000000000000000000000000). Please note that this
only applies for `builtins.fetchGit` and *not* for `builtins.fetchTree{
type = "git"; }`.
|
|
|