Age | Commit message (Collapse) | Author |
|
|
|
|
|
Rather than having them plain strings scattered through the whole
codebase, create an enum containing all the known experimental features.
This means that
- Nix can now `warn` when an unkwown experimental feature is passed
(making it much nicer to spot typos and spot deprecated features)
- It’s now easy to remove a feature altogether (once the feature isn’t
experimental anymore or is dropped) by just removing the field for the
enum and letting the compiler point us to all the now invalid usages
of it.
|
|
|
|
|
|
Based off on @dtzWill's #2276
|
|
9c766a40cbbd3a350a9582d0fd8201e3361a63b2 broke logging from the
daemon, because commonChildInit is called when starting the build hook
in a vfork, so it ends up resetting the parent's logger. So don't
vfork.
It might be best to get rid of vfork altogether, but that may cause
problems, e.g. when we call an external program like git from the
evaluator.
|
|
|
|
|
|
In the child process, we can do a chdir() and avoid the problem of the
path not fitting into sockaddr_un.
|
|
`size_t` is 32-bit on 32-bit platforms, while the file size can be bigger
|
|
With -vvvv, the ProgressBar was polluting the stderr of the child,
messing up its \2 message to the parent.
|
|
|
|
|
|
Change warning messages from yellow to magenta
|
|
nix --help: Display help using lowdown instead of man
|
|
This matches gcc and clang.
|
|
|
|
|
|
|
|
Also get rid of _killStderr because it wasn't actually checked
anywhere.
|
|
Fixes #4476.
Fixes #5231.
|
|
|
|
|
|
Issues #4499.
|
|
Don't overwrite user provided `lib*_LDFLAGS`
|
|
This fixes a class of crashes and introduces ptr<T> to make the
code robust against this failure mode going forward.
Thanks regnat for the idea of a ref<T> without overhead!
Closes #4895
Closes #4893
Closes #5127
Closes #5113
|
|
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
|
|
Fixes #5159
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
|
|
* libstore: `bz2` should not be linked
* libutil: `zlib.h` should not be included
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
|
|
Previously, despite having a boolean that tracked initialization, the
decode characters have been "calculated" every single time a base64
string was being decoded.
With this change we only initialize the decode array once in a
thread-safe manner.
|
|
Otherwise I get a compiler error when building for NetBSD:
src/libutil/util.cc: In function 'void nix::_deletePath(const Path&, uint64_t&)':
src/libutil/util.cc:438:17: error: base operand of '->' is not a pointer
438 | AutoCloseFD dirfd(open(dir.c_str(), O_RDONLY));
| ^~~~~
src/libutil/util.cc:439:10: error: 'dirfd' was not declared in this scope
439 | if (!dirfd) {
| ^~~~~
src/libutil/util.cc:444:17: error: 'dirfd' was not declared in this scope
444 | _deletePath(dirfd.get(), path, bytesFreed);
| ^~~~~
|
|
Also remove an erroneous comment.
|
|
Fill `NIX_CONFIG` with the value of the current Nix configuration before
calling the post-build-hook.
That way the whole configuration (including the possible
`experimental-features`, a possibly `--store` option or whatever) will
be made available to the hook
|
|
|
|
Prefer to throw specific errors
|
|
|
|
|
|
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
|
|
Make sure that whenever we substitute a realisation, we also substitute
its entire closure
|
|
Move the `closure` logic of `computeFSClosure` to its own (templated) function.
This doesn’t bring much by itself (except for the ability to properly
test the “closure” functionality independently from the rest), but it
allows reusing it (in particular for the realisations which will require
a very similar closure computation)
|
|
When you have a symlink like:
/tmp -> ./private/tmp
you need to resolve ./private/tmp relative to /tmp’s dir: ‘/’. Unlike
any other path output by dirOf, / ends with a slash. We don’t want
trailing slashes here since we will append another slash in the next
comoponent, so clear s like we would if it was a symlink to an absoute
path.
This should fix at least part of the issue in
https://github.com/NixOS/nix/issues/4822, will need confirmation that
it actually fixes the problem to close though.
Introduced in f3f228700a52857fe6e8632df4e935551ea219ff.
|
|
This function doesn't support all compression methods (i.e. 'none' and
'br') so it shouldn't be exposed.
Also restore the original decompress() as a wrapper around
makeDecompressionSink().
|
|
The S3 store relies on the ability to be able to decompress things with
an empty method, because it just passes the value of the Content-Encoding
directly to decompress.
If the file is not compressed, then this will cause the compression
routine to get confused.
This caused NixOS/nixpkgs#120120.
|
|
This has been broken since faa31f40846f7a4dbc2487d000b112a6aef69d1b.
|
|
Optimize canonPath to resolve relative symlinks in one pass
|
|
|
|
|
|
Fixes #4673.
|
|
|