nixpkgs/pkgs/os-specific
Profpatsch cb7bc7c60f nixos-rebuild: Print commands as they are run on verbose flag
nixos-rebuild would forward all verbose flags to nix, but not actually
increase its own verbosity.
Which would make it hard to see what’s going on without resorting to
tools like strace or adding `set -x` to the script.

We add a simple exec wrapper around the most “interesting” commands,
that is nix tool invocations. If any verbosity flag is given, it will
set the verbosity flag of the nixos-rebuild script all commands
wrapped into `runCmd` will start logging their invocation.

This is done via a `logVerbose` function, which can also be used to
print logging messages when in verbose mode, to aid debugging why
nixos-rebuild does what it does. A few messages are added, but
potentially we could log a lot more details.

Now, testing all of the changed code paths turns out to be rather
hard, so I am unsure how to verify that for all changed commands
behaviour stays indeed the same.
2022-03-19 15:13:50 +01:00
..
bsd netbsd.compat: don't use musl's sys/cdefs.h 2022-01-06 14:22:07 +00:00
darwin sketchybar: 2.4.3 -> 2.5.0 2022-03-10 01:07:06 +08:00
linux nixos-rebuild: Print commands as they are run on verbose flag 2022-03-19 15:13:50 +01:00
solo5 solo5: patch solo5-virtio-mkimage to use our Syslinux, etc 2022-02-05 21:32:18 +01:00
windows maintainers: update personal details 2021-12-31 21:48:55 +03:00