writers: add writeRust and deduplicate binary stripping#109050
writers: add writeRust and deduplicate binary stripping#109050Lassulus merged 3 commits intoNixOS:masterfrom
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.