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
writers: add writeRust and deduplicate binary stripping #109050
Conversation
I should probably also quote more variables generally in the nix-writers. just to have a uniform style (more quoting is better than less quoting) Do we maybe want to add an optional strip argument to writeHaskell, writeC, writeRust? and inherit it in the call to makeBinWriter? |
At least the standard $out does not require quoting because the path can't contain spaces, new lines, etc. |
I added a strip argument to those, good idea :-) |
ah, can you also add a test (at least a bin one) into https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/test.nix ? simple would also be cool when you figure out how to use libraries :) |
I added a trivial test. The thing with libraries is that the rust world universally uses cargo for that, so if you need libs, you are probably better off using |
I’ve been using these rust writers with some success: They are just wrappers around |
Motivation for this change
I want to use rust code in nixpkgs, but there sure are other use cases.