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
[doc] Add example on how to override compile flags for a package #23123
[doc] Add example on how to override compile flags for a package #23123
Conversation
@matthiasbeyer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Profpatsch, @lethalman and @abbradar to be potential reviewers. |
To me, the complexity of this overshadows the point; this'd be clearer:
or some variation thereof. I also think it's redundant to say that it compiles foo with the listed flags: it is self-evident. EDIT: syntax error |
@joachifm Thanks for the suggestion. It is complicated because I couldn't find documentation on how to do this, so I had to hack this together myself. I will test your suggestions and update this PR shortly! 👍 |
Don't merge! I guess I missed a blank before the flag |
Okay. I'm ready to fix things up! |
What about moving that utility function to (As a side note, I think the cflags example is strictly redundant in the context of a function reference, as it fails to teach the reader anything new about |
@matthiasbeyer I think you could be a bit more explicit about what this env var does. It passes the flag directly to the compiler, and therefore it typically won't be shown during configuration as you found out. I think this is worth mentioning. |
@joachifm you mean I should put this function into nixpkgs/lib? |
@matthiasbeyer something like that. A function reference is not a good place for utility functions, imo. |
I wonder whether https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/configuration/customizing-packages.xml would be a better place for this? |
@joachifm this way? 😄 |
Will this get merged? |
And again I was able to feel the pain and uglyness of writing XML! shiver
Closes #22668