Age | Commit message (Collapse) | Author |
|
|
|
Log the decompressed body in case of http errors
|
|
|
|
Don't show the users the raw (possibly compressed) error message as
everyone isn't able to decompress brotli in their brain.
|
|
This ensures that in cout(s), 's' does not get interpreted as a format
string.
|
|
Fixes #7939.
|
|
This ensures that write errors do not get ignored.
|
|
Always set valid in path-info --json output
|
|
Remove dead code `RemoteStore::sameMachine`
|
|
|
|
It has been dead code since 9747ea84b43c75f719d719673b9d0a7cb50d34e5.
|
|
bobvanderlinden/pr-improve-nix-profile-install-error
Improve error on conflict for nix profile install
|
|
|
|
Currently the valid key is only present when the path is invalid, which
makes checking path validity more complex than it should be. With this
change, the valid key can always be used to check if a path is valid
|
|
The release notes document the change in behavior, I don't include it
here so there is no risk to it getting out of sync.
> Motivation
>> Plumbing CLI should be simple
Store derivation installations are intended as "plumbing": very simple
utilities for advanced users and scripts, and not what regular users
interact with. (Similarly, regular Git users will use branch and tag
names not explicit hashes for most things.)
The plumbing CLI should prize simplicity over convenience; that is its
raison d'etre. If the user provides a path, we should treat it the same
way not caring what sort of path it is.
>> Scripting
This is especially important for the scripting use-case. when arbitrary
paths are sent to e.g. `nix copy` and the script author wants consistent
behavior regardless of what those store paths are. Otherwise the script
author needs to be careful to filter out `.drv` ones, and then run `nix
copy` again with those paths and `--derivation`. That is not good!
>> Surprisingly low impact
Only two lines in the tests need changing, showing that the impact of
this is pretty light.
Many command, like `nix log` will continue to work with just the
derivation passed as before. This because we used to:
- Special case the drv path and replace it with it's outputs (what this
gets rid of).
- Turn those output path *back* into the original drv path.
Now we just skip that entire round trip!
> Context
Issue #7261 lays out a broader vision for getting rid of `--derivation`,
and has this as one of its dependencies. But we can do this with or
without that.
`Installable::toDerivations` is changed to handle the case of a
`DerivedPath::Opaque` ending in `.drv`, which is new: it simply doesn't
need to do any extra work in that case. On this basis, commands like
`nix {show-derivation,log} /nix/store/...-foo.drv` still work as before,
as described above.
When testing older daemons, the post-build-hook will be run against the
old CLI, so we need the old version of the post-build-hook to support
that use-case.
Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
Resolves #7437 for new `nix-store` by adding a `--stdin` flag.
|
|
Resolves #7437 for new `nix` commands only by adding a `--stdin` flag.
If paths are also passed on the cli they will be combined with the ones
from standard input.
|
|
Check interrupts even when download stalled
|
|
Example uses gitlab.com thus clarify the comment
|
|
Whenever a file conflict happens during "nix profile install" an error
is shown that was previously thrown inside builtins.buildEnv.
We catch BuildProfileConflictError here so that we can provide the user
with more useful instructions on what to do next.
Most notably, we give the user concrete commands to use with all
parameters already filled in. This avoids the need for the user to look
up these commands in manual pages.
|
|
Revert #7689
|
|
At the moment an Error is thrown that only holds an error message
regarding `nix-env` and `nix profile`. These tools make use of
builtins.buildEnv, but buildEnv is also used in other places. These
places are unrelated to Nix profiles, so the error shouldn't mention
these tools.
This generic error is now BuildEnvFileConflictError, which holds more
contextual information about the files that were conflicting while
building the environment.
|
|
Properly escape local paths into URLs in fetchTree
|
|
add information on the `build-hook` setting
|
|
add a warning that you probably never want to change this.
|
|
|
|
|
|
This reverts commit 1cba5984a68a489c4a56691032e4c87991c678f4.
|
|
This reverts commit dba9173a1d8cb1dd40e5922d009cb3a434e081c3.
|
|
Ensure that `self.outPath == ./.`
|
|
|
|
build-remote: don't warn when all local build slots are taken
|
|
It would be incorrect to say that the `sourceInfo` has an `outPath`
that isn't the root. `sourceInfo` is about the root, whereas only
the flake may not be about the root. Thanks Eelco for pointing that
out.
|
|
Users expect `self` to refer to the directory where the `flake.nix`
file resides.
|
|
Fix the build without GC
|
|
Make `--read-only` a separate mixin
|
|
I had given it an improper trailing comma in
1bd03ad100e8813751b6c08b0c21ae8cf5a9c21d.
|
|
Wait with making /etc unwritable until after build env setup
|
|
When I moved this code from the binary to libnixstore #7863, I forgot to
display the environment variables!
|
|
Move Derivation JSON printing logic to lib and test it
|
|
It is independent of SourceExprCommand, which is about parsing
installables, except for the fact that parsing installables is one of
the many things influenced by read-only mode.
|
|
The REPL itself and the `nix repl` CLI are conceptually different
things, and thus deserve to be in different files.
|
|
|
|
|
|
|
|
|
|
|
|
This fixes /etc/nsswitch.conf
|
|
If this documentation is inaccurate in any way please do not hesitate to suggest corrections.
My understanding of this function is strictly from reading the source code and some limited experience implementing fetchers.
|
|
Reduce memory leaks
|