-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdenv: log hooks as they run (take II) #310387
Conversation
Rebased on latest staging |
I would recommend to wait for the next staging cycle as the current one is the last NixOS 24.05's one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. I'm currently building a representative sample of nixpkgs, and I see the hook logging.
c9dce8e
to
9919521
Compare
Now that the last staging cycle for 24.05 has been done, this PR should be ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM tested with nix-shell on master
$ curl -L https://github.com/NixOS/nixpkgs/pull/310387.patch | git apply
$ cat test.sh
#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p hello
hello
$ NIX_PATH=nixpkgs=`pwd` ./test.sh | tee stdout.log
[...]
$ cat stdout.log
Hello, world!
Let's rumble! Thanks to everyone for getting this through and thanks to @Qyriad for authoring it. I really like how it helps make what's going on with hooks more understandable. |
Description of changes
A second take at #290081, which changes the stdenv builder to log setup and build hooks as they run, but which was reverted for the extra logging during the internals of
nix-shell -p
. This PR does the same logging, but to $NIX_LOG_FD instead, which is echoed during any normal build, but not during the internals ofnix-shell -p
.cc @philiptaron @RaitoBezarius from the last PR
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.