Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Hopefully fixes #3081 (didn't test).
|
|
|
|
This is to assert that callback functions should never throw (since
the context in which they're called may not be able to handle the
exception).
|
|
Also, make Callback movable but uncopyable.
|
|
|
|
Use wait4path on org.nixos.nix-daemon.plist
|
|
launchd has some weird syntx. Apparently the program needs to be in
the ProgramArguments, as Program appears to be ignored.
|
|
Set maximum name length in Nix
|
|
Fix nix-env documentation for --delete-generations
|
|
It doesn't seem very reliable on ZFS.
|
|
My attempt at clarifying the docs resulted in a false explanation. This
is now fixed and I added an example to eliminate all possible confusion.
|
|
|
|
|
|
|
|
|
|
https://hydra.nixos.org/build/99500938
|
|
Handle SIGWINCH in main thread
|
|
Previously we allowed any length of name for Nix derivations. This is
bad because different file systems have different max lengths. To make
things predictable, I have picked a max. This was done by trying to
build this derivation:
derivation {
name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
builder = "/no-such-path";
system = "x86_64-linux";
}
Take off one a and it will not lead to file name too long. That ends
up being 212 a’s. An even smaller max could be picked if we want to
support more file systems.
Working backwards, this is why:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-${name}.drv.chroot
> 255 - 32 - 1 - 4 - 7 = 211
|
|
These are already handled separately. This fixes warnings like
warning: ignoring the user-specified setting 'max-jobs', because it is a restricted setting and you are not a trusted user
when using the -j flag.
|
|
install-multi-user: Detect and fail lack of systemd separately
|
|
Allow empty /nix directory in multi-user installer
|
|
This cuts about 46 MiB from the closure.
|
|
Fixes https://github.com/NixOS/nix/issues/240.
Apparently 'tar -xf' can decompress xz files on macOS nowadays.
|
|
|
|
|
|
|
|
operators: document exact precedence, split up similar operators
|
|
https://hydra.nixos.org/build/99262744
|
|
|
|
When using a volume, the nix-daemon path may not exist. To avoid this
issue, we must use the wait4path tool. This should solve one of the
issues in multi-user on macOS Catalina.
|
|
|
|
nix-daemon.service: add install section.
|
|
Signed-off-by: Piotr Szubiakowski <pszubiak@eso.org>
|
|
installer: handle network proxy in systemd multi-user install
|
|
|
|
If a network proxy configuration is detected, setup an override
systemd unit file for nix-daemon service with the non-empty
proxy variables.
Proxy detection is performed by looking for http/https/ftp proxy and no
proxy variables in user environment
|
|
|
|
|
|
With macOS catalina, we can no longer modify the root system
volume (#2925). macOS provides a system configuration file in
synthetic.conf(5) to create empty root directories. This can be used
to mount /nix to a separate volume. As a result, this directory will
need to already exist prior to installation. Instead, check for
/nix/store and /nix/var for a live Nix installation.
|
|
The documentation for `--delete-generations` had an erroneous fullstop
and as it turns out inaccurate information on the `+No.` syntax.
|
|
Fix for `unknown serve command 13`
|
|
If a NAR is already in the store, addToStore doesn't read the source
which makes the protocol go out of sync. This happens for example when
two client try to nix-copy-closure the same derivation at the same time.
|
|
Introduce the SizeSource which allows to bound how much data is being
read from a source. It also contains a drainAll() function to discard
the rest of the source, useful to keep the nix protocol in sync.
|
|
Expanded documentation for .nix-defexpr
|
|
Track function start and end
|
|
|
|
With this patch, and this file I called `log.py`:
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 --pure
import sys
from pprint import pprint
stack = []
timestack = []
for line in open(sys.argv[1]):
components = line.strip().split(" ", 2)
if components[0] != "function-trace":
continue
direction = components[1]
components = components[2].rsplit(" ", 2)
loc = components[0]
_at = components[1]
time = int(components[2])
if direction == "entered":
stack.append(loc)
timestack.append(time)
elif direction == "exited":
dur = time - timestack.pop()
vst = ";".join(stack)
print(f"{vst} {dur}")
stack.pop()
and:
nix-instantiate --trace-function-calls -vvvv ../nixpkgs/pkgs/top-level/release.nix -A unstable > log.matthewbauer 2>&1
./log.py ./log.matthewbauer > log.matthewbauer.folded
flamegraph.pl --title matthewbauer-post-pr log.matthewbauer.folded > log.matthewbauer.folded.svg
I can make flame graphs like: http://gsc.io/log.matthewbauer.folded.svg
---
Includes test cases around function call failures and tryEval. Uses
RAII so the finish is always called at the end of the function.
|
|
conf: stalled-download-timeout: make tunable
|