stdenv: log hooks as they run (take II)#310387
Merged
RaitoBezarius merged 1 commit intoNixOS:stagingfrom Jun 19, 2024
Merged
Conversation
Member
Author
|
Rebased on latest staging |
Member
|
I would recommend to wait for the next staging cycle as the current one is the last NixOS 24.05's one. |
philiptaron
approved these changes
May 11, 2024
Contributor
philiptaron
left a comment
There was a problem hiding this comment.
Code looks good to me. I'm currently building a representative sample of nixpkgs, and I see the hook logging.
xzfc
suggested changes
May 12, 2024
c9dce8e to
9919521
Compare
Member
Author
|
Now that the last staging cycle for 24.05 has been done, this PR should be ready |
philiptaron
approved these changes
May 23, 2024
xzfc
approved these changes
Jun 2, 2024
paparodeo
approved these changes
Jun 10, 2024
Contributor
paparodeo
left a comment
There was a problem hiding this comment.
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!
Contributor
|
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. |
This was referenced Jul 31, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = relaxedsandbox = truenix-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.