zigHook: init#242397
Conversation
|
P.S.: Zig eats a lot of memory! |
|
+1 |
|
Now I am a bit more confident of splitting this! |
|
@RaitoBezarius @figsoda ping (because you both gave the initial ideas). |
|
@AndersonTorres how would use this in #241741? |
|
Seriously speaking, these hooks are very independent and self-contained, obviating the On the other hand, it is too dependent on Bash. |
figsoda
left a comment
There was a problem hiding this comment.
as previously suggested, we should include the conversion of some packages (1 or 2 is fine), and documentation
There was a problem hiding this comment.
we should be able to do something like this
| echo "zig build flags: $zigBuildFlags ${zigBuildFlagsArray[@]}" | |
| zig build $zigBuildFlags "${zigBuildFlagsArray[@]}" | |
| (set -x; zig build $zigBuildFlags "${zigBuildFlagsArray[@]}") |
There was a problem hiding this comment.
I see that you switched to echoCmd, did this approach not work?
There was a problem hiding this comment.
Well, it worked, however I preferred the traditional approach, because it escapes the quotes and whitespaces
Conversion is here: |
I will close my pr if merged |
I'm sorry you went through that effort, I think we should write documentation when people want to build new in-tree builders like those to give them proper direction on the good way to do it. |
|
@figsoda any hints about the documentation and its new format? |
There was a problem hiding this comment.
@andrewrk is there any rationale for this, specifically? Some flags use the format --x=y but others insist on --x y.
figsoda
left a comment
There was a problem hiding this comment.
overall lgtm, there are still some design decisions I'm unsure about, but I don't have a strong opinion on any of them
|
Another round and it will be ready to merge. |
|
Let's wait arm darwin, then. |
|
One full day? I will not wait, sorry. |
A setup hook for using the Zig compiler in Nixpkgs. *Warning*: the setup-hook shell script was linted with shellcheck!
Because zig itself doesn't set it by default.
A somewhat short documentation about zigHook.
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)