-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
*FlagsArray do not work as people expect them to #112054
Comments
It is not ignored in general for other packages i.e. glow:
|
fixed in #112104 |
No, this is not a There is still a mismatch between If I run
You did the #112104 fix by switching correct flags (1) to invalid (3) |
It should be fixed in |
Can you provide a pull request with a fix? I don't see why I should revert the fix for nebula. It now correctly displays the version. If you have a better fix go ahead. |
Who cares how nebula displays the version? The real issue is:
|
I suspect |
Sorry for wasting your time. Please don't ping me in future. |
This comment has been minimized.
This comment has been minimized.
If you find a credible problem, please report it to the NixOS Security Team. If you'd like to remove the FUD, we could un-hide the comment. |
Yes, this looks like a |
This is not just If you pass an attribute containing a list of strings to That means the single quotes in the original Nix expression got passed as literals (bash does not really interpret the values of variables passed to derivations), which is why it did not work. The “fixed” nebula only works because That is why I recommend using |
Perhaps |
Another reason why I think this might the right way to go is to abstract away the -s and -w flags we ask package maintainers to set on their packages. |
For now, I opened a PR adding a lint for this to nixpkgs-hammering: jtojnar/nixpkgs-hammering#30 |
Isn't it just a case to find implicit List's |
If you have a linter, it would be nice to warn on every List's |
Adding explicit escaping will not work, Nix passes everything to Bash as a literal string so all the backslashes and quotes would just become literal parts of the first array item, AFAICT. See #112104 (comment) |
Describe the bug
buildGoModule
ignoresbuildFlagsArray
For example
nebula
is built without-ldflags='-X main.Build=${version}'
despite the instructionnixpkgs/pkgs/tools/networking/nebula/default.nix
Line 20 in bff1304
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Notify maintainers
@zowoq @flokli @c00w @kalbasit @marsam @basvandijk @Mic92 @Br1ght0ne
Metadata
reproducible with
release-20.03
,release-20.09
andmaster
The text was updated successfully, but these errors were encountered: