-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
fix: nodejs: strict-builder: patch shebangs #510
base: main
Are you sure you want to change the base?
Conversation
@hsjobeki I wonder why the we even produce node_modules that contain broken shebangs. Usually patchShebang is executed automatically in the fixup phase of each individual derivation, so there shouldn't be any corrupt shebangs. |
Strange. I‘d need to investigate this. questions:
|
It wasn't straightforward to only patch what's in
No, there can be a cleaner operation for the runnables. Any suggestions?
I can do it there instead. Sorry, still not completely familiar with this builder |
Thanks for your efforts. I appreciate it. |
Oh, I suppose since the tree is built fully with python, there's not a fixup phase that the derivation goes into at that time. As far as I understand, anyways. I don't know what that would entail to run the nix path substitution from within the python builds
Sounds good! no problem |
Oh yeah, I forgot about the node-modules-tree.nix
Note that patchShebangs can only substitute paths in shebangs for known buildInputs. The runCommandLocal which is used to execute the python builder probably needs nodejs as a build input and any other things that are expected to appear in shebangs. |
For the scenario where the installed
node_modules
were used for building (nestjs in my situation), the shebangs were not patched for build time in the strict-builder. That lead tono such file or directory
in the sandbox.reference: https://matrix.to/#/!PrIEtcffTLLzUWvJOS:matrix.org/$zslZWYi4HF0xramEQum6xf808-VQbbJIkN4kbgGFqt0?via=nixos.org&via=matrix.org&via=nixos.dev
Also, the bins weren't runnable permissions.
This didn't seem like an issue within the granular builder, but maybe you all would know better than I if a similar fix is needed there as well.
@hsjobeki @DavHau